IOS7 what is the difference in all of these colors: "barTintColor, tintColor, backgroundColor, UITextAttributeTextColor"?

I am completely confused in all of these color settings in the navigationController in iOS7. Can someone tell me what exactly is the difference among all these things? I tried to figure out some of them, but I'm not sure if I am right.

Thanks!

self.navigationController.navigationBar.barTintColor=[UIColor redColor];//???

self.navigationController.navigationBar.backgroundColor=[UIColor greenColor];//???

self.navigationController.navigationBar.tintColor=[UIColor whiteColor];//the text colour of backButton of the navigationBar???

self.navigationController.navigationBar.titleTextAttributes = @{UITextAttributeTextColor:[UIColor blueColor]};//the text color of the title of the navigationBar

 [self.navigationItem.rightBarButtonItem setTitleTextAttributes:@{UITextAttributeTextColor:[UIColor greyColor]} forState:UIControlStateNormal];//the text colour of the customised rightButton in the navigationBar
+4
source share
1 answer

Here is the difference between the above:

barTintColor: The hue color applied to the background of the navigation bar.

backgroundColor: change the background color of the navigation bar

tintColor: The hue color applied to navigation items and panel items.

UITextAttributeTextColor: . UIColor. Available in iOS 5.0 and later.Deprecated in iOS 7.0. easy fix. UITextAttributeTextColor to NSForegroundColorAttributeName

: https://developer.apple.com/library/ios/documentation/uikit/reference/UINavigationBar_Class/Reference/UINavigationBar.html

+11

Source: https://habr.com/ru/post/1524414/


All Articles