Charlie Wu
Charlie Wu

Reputation: 7757

uinavigationbar uiappearance in popover bartintcolor not working

I uses UIAppearance to set the bartint color for my UINavigationBar, this works fine except for navigation bars in popovers, am I missing something here?

the following line is in application didFinishLaunchingWithOptions

[[UINavigationBar appearanceWhenContainedIn:[UIPopoverController class], nil] setBarTintColor:[UIColor redColor]];

Upvotes: 3

Views: 367

Answers (1)

Majid Bashir
Majid Bashir

Reputation: 568

UIImage *navBarImage = [[UIImage imagewithcolor:[UIColor redColor]] resizableImageWithCapInsets:UIEdgeInsetsMake(7, 7, 7, 7)];
[[UINavigationBar appearance] setBackgroundImage:navBarImage forBarMetrics:UIBarMetricsDefault];


Hope this wil work

Upvotes: 0

Related Questions