iOS 10 can no longer set barcolor and tint on MFMessageComposeViewController

后端 未结 4 559
被撕碎了的回忆
被撕碎了的回忆 2021-02-04 01:50

Below code works on iOS version 9.x or less, for some reason this does not work if iOS 10

 if([MFMessageComposeViewController canSendText])
             {
               


        
4条回答
  •  误落风尘
    2021-02-04 02:49

    This works for me at least for title and button items.

    [UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil].tintColor = [UIColor redColor];
    [UINavigationBar appearance].titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor redColor]};
    

    Look for more info here: https://developer.apple.com/reference/uikit/uiappearance

    Hope this helps. Cheers

提交回复
热议问题