修改UIImagePickerController的naviga

2017-09-14  本文已影响49人  景彧

在UIImagePickerControllerDelegate方法中编写:

- (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
    UINavigationBar *navigationBar = navigationController.navigationBar;
    [navigationBar setBackgroundImage:[UIImage imageNamed:@"background.png"] forBarMetrics:UIBarMetricsDefault];
    navigationBar.tintColor = [UIColor whiteColor];
    [[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
} 
上一篇 下一篇

猜你喜欢

热点阅读