标签:style blog c ext color http
// 设置导航栏的文字
self.navigationItem.title = @"功效";
mySearchBar = [[UISearchBaralloc] initWithFrame:CGRectMake(0, 25, 50, 30)];
mySearchBar.delegate = self;
mySearchBar.placeholder = @"请输入查询的蔬菜、水果等的品名";// 设置占位符
searchDisplayController = [[UISearchDisplayControlleralloc] initWithSearchBar:mySearchBarcontentsController:self];
searchDisplayController.active = NO;
self.navigationItem.titleView = mySearchBar;// 添加到导航控制器上
[mySearchBarrelease];
[searchDisplayControllerrelease];
运行效果如下:
navigationController基本设置,布布扣,bubuko.com
标签:style blog c ext color http
原文地址:http://www.cnblogs.com/k-k-m/p/3726107.html