简体   繁体   English

CNContactViewController导航栏背景颜色与我的应用不匹配

[英]CNContactViewController navigation bar background color is not matching with my app

I am using CNContactViewController form contact framework for adding new local contact, but after presenting this view controller navigation bar becomes some different color which is not matching in my app. 我正在使用CNContactViewController表单联系人框架来添加新的本地联系人,但是在显示此视图控制器后,导航栏变成了一些与我的应用程序不匹配的颜色。 below is the code and i am adding screenshot too for reference. 下面是代码,我也添加了屏幕截图以供参考。 please suggest me a way to customize this navigation bar. 请为我建议一种自定义此导航栏的方法。

CNContactStore *store = [[CNContactStore alloc] init];
CNMutableContact *contact = [[CNMutableContact alloc] init];
CNContactViewController *controller = [CNContactViewController viewControllerForNewContact:contact];


controller.contactStore = store;
controller.delegate = self;

[self presentViewController:controller animated:YES completion:nil];

在此处输入图片说明

您可以使用以下命令在AppDelegate didFinishLaunching应用程序的所有导航栏实例(包括CNContactViewController)中设置栏色调颜色:

[[UINavigationBar appearance] setBarTintColor: [UIColor ... yourColor]];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM