objective-c – 当从iOS10中的UIActivityViewController呈现时,
发布时间:2020-12-14 17:19:36 所属栏目:百科 来源:网络整理
导读:我正在使用UIActivityViewController在iOS10中共享项目.当我点击“邮件”选项时,它会弹出邮件编辑器,但导航栏上的“取消”和“发送”按钮以及导航栏本身都是蓝色的,这使得它很难阅读,所以我想改变它们的颜色.短信共享也是如此. 我试过这个 [[[controller nav
我正在使用UIActivityViewController在iOS10中共享项目.当我点击“邮件”选项时,它会弹出邮件编辑器,但导航栏上的“取消”和“发送”按钮以及导航栏本身都是蓝色的,这使得它很难阅读,所以我想改变它们的颜色.短信共享也是如此.
我试过这个 [[[controller navigationController] navigationBar] setTintColor:[UIColor blackColor]]; 还有这个 [[UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UINavigationBar class]]] setTintColor:[UIColor blackColor]]; 还有这个 [[UINavigationBar appearance] setTintColor:[UIColor blackColor]]; 还有这个 [[UINavigationBar appearance] setBarTintColor:[UIColor blackColor]]; 但没有任何作用.我甚至尝试将UIActivityViewController子类化,但它的方法 – (void)presentViewController:(UIViewController *)viewControllerToPresent animated:(BOOL)标志完成:(void(^)(void))完成从未调用. 解决方法[[UIBarButtonItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor whiteColor]} forState:UIControlStateNormal]; (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |