iOS 7 UIBarButton back button arrow color

后端 未结 17 2034
情话喂你
情话喂你 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:55

    I had to use both:

    [[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] 
                         setTitleTextAttributes:[NSDictionary 
                   dictionaryWithObjectsAndKeys:[UIColor whiteColor], UITextAttributeTextColor,nil] 
                                       forState:UIControlStateNormal];
    
    [[self.navigationController.navigationBar.subviews lastObject] setTintColor:[UIColor whiteColor]];
    

    And works for me, thank you for everyone!

提交回复
热议问题