保持UIImagePickerController后导航栏风格统一

1. UIImagePickerController 状态栏始终保持某一种风格.

-(void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated{      [[UIApplication  sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque];  

}  

-(void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated{  

    [[UIApplication  sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque];  

}  

 

2:修改 UIImagePickerController 顶部导航栏的颜色风格

 

    [[picker navigationBar] setTintColor:[UIColor whiteColor]];

    [[picker navigationBar] setBarTintColor:kNavigationBarColor];

posted on 2015-09-21 16:18  助金  阅读(383)  评论(0编辑  收藏  举报