iOS 7 UIBarButton back button arrow color

后端 未结 17 2030
情话喂你
情话喂你 2020-12-04 06:30

I\'m trying to change the back button arrow

\"enter

I\'m currently using the

17条回答
  •  误落风尘
    2020-12-04 06:40

    To change the back button chevron color for a specific navigation controller*:

    self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
    

    *If you are using an app with more than 1 navigation controller, and you want this chevron color to apply to each, you may want to use the appearance proxy to set the back button chevron for every navigation controller, as follows:

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

    And for good measure, in swift (thanks to Jay Mayu in the comments):

    UINavigationBar.appearance().tintColor = UIColor.whiteColor()
    

提交回复
热议问题