Changing the Tint Color of UIBarButtonItem

后端 未结 8 1885
暗喜
暗喜 2020-12-15 03:31

I have a project using Storyboards and whenever I push a view controller with a segue, the dynamically created bar button item is always blue.

8条回答
  •  眼角桃花
    2020-12-15 03:47

    I think you are looking for a property of your UINavigationBar. Try setting self.navigationController.navigationBar.tintColor = [UIColor whiteColor];

    See "Appearance of Navigation Bars" section: https://developer.apple.com/library/ios/documentation/userexperience/conceptual/UIKitUICatalog/UINavigationBar.html#//apple_ref/doc/uid/TP40012857-UINavigationBar-SW1

提交回复
热议问题