●指定ViewController自己的Title, 當下層View有NavigationBar時, Back旁邊的文字就是Title
self.title = @"Main";
●本頁面自己是否隱藏NavigationBar, 要寫在本頁的viewWillAppear
self.navigationController.navigationBarHidden = true;
//[self.navigationController setNavigationBarHidden:true animated:true];
●指定背景色
float iOSversion = [[[ UIDevice currentDevice ] systemVersion ] floatValue ];
if(iOSversion <7)
self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:0 green:0 blue:1.0 alpha:1.0];
else
self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:0 green:0 blue:1.0 alpha:1.0];7>
沒有留言:
張貼留言