加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

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];

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读