iOS 7 UIBarButton back button arrow color

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

    UINavigationBar *nbar = self.navigationController.navigationBar;
    
    if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1) {
       //iOS 7
       nbar.barTintColor = [UIColor blueColor]; // bar color
       //or custom color 
       //[UIColor colorWithRed:19.0/255.0 green:86.0/255.0 blue:138.0/255.0 alpha:1];
    
       nbar.navigationBar.translucent = NO;
    
       nbar.tintColor = [UIColor blueColor]; //bar button item color
    
    } else {
       //ios 4,5,6
       nbar.tintColor = [UIColor whiteColor];
       //or custom color
       //[UIColor colorWithRed:19.0/255.0 green:86.0/255.0 blue:138.0/255.0 alpha:1];
    
    }
    

提交回复
热议问题