Closed HariPrasad closed 9 years ago
The tintColor
property on the ATConnect
object only affects the color of the bar button items in the navigation bar (as well as any active buttons in the Message Center UI).
Our intention was to allow people to override the bar tint color using UIAppearance, but you are correct that the way we explicitly set the barTintColor will override any other settings.
We are aware of the this issue and we'll be sure to keep you up to date when we have a fix available.
The 2.0.2 release (available on GitHub now and arriving on CocoaPods shortly) should fix this. You can now override the barTintColor
for all Apptentive UI as follows:
[UINavigationBar appearanceWhenContainedIn:[ATNavigationController class], nil].barTintColor = myCustomBarTintColor;
You can adjust the tintColor
of Apptentive view controllers using the (now deprecated) tintColor
property on the ATConnect
singleton, or the following code:
[UIView appearanceWhenContainedIn:[ATNavigationController class], nil].tintColor = myCustomTintColor;
Apptentive UI based on UIAlertController
will continue to pick up your application window's tintColor
property in iOS 8 and later. In iOS 7 the default colors cannot be overridden.
Please see the Customization Guide for more information.
@frankus is there also a swift 2.0 example?
Thanks much and best regards, C
Our existing example project should work. (I just ran the previous version through the conversion process—resulting in no source changes—and checked in the updated project file).
For iOS9 the "appearanceWhenContainedIn" isn't available anymore.. Now it's the following:
UINavigationBar.appearanceWhenContainedInInstancesOfClasses([ATNavigationController.self]).backgroundColor = ChooStyleKit.blue
best regards, C
Oh right, I forgot about that. I’ll make a note to add that to the documentation.
Thanks,
Frank
If we use [ATConnect sharedConnection].tintColor to set custom color that will be over written to white color at line 122.