Modal status bar and navigation bar text colors from UIActivityViewControllers in iOS 7

后端 未结 6 1965
孤独总比滥情好
孤独总比滥情好 2021-01-01 16:50

When I\'m using a UIActivityViewController, after the user chooses an activity (such as Mail or Message), I can not change the text color for the status bar nor

6条回答
  •  有刺的猬
    2021-01-01 17:26

    I believe the code to change the navigation bar color is this:

    [[UINavigationBar appearance] setBarTintColor:[UIColor whiteColor]];
    

    This is for changing the colours of the navigation bar buttons in iOS 7, if you might need it:

    [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
    

    And this is the code if you want to change the colours of the buttons in iOS 6:

    [[UIBarButtonItem appearance] setTintColor:[UIColor redColor]];
    

    This code is also for iOS 8+ to change the bar button text color for UIActivityViewController activities (like sharing via Messages or Mail Composer).

提交回复
热议问题