In iOS 6, SKStoreProductViewController was introduced to show iTunes Store items in apps, so the user would not have to leave the app to view them.
So far, I have not found a way to customize the navigation bar of this view controller. In iOS 6, it is black with grey writing, and in iOS 7, it is white with black writing.
Is there any way to change the navigation bar's tint color? (In iOS 6 & iOS 7)
Thanks.
Not the nicest solution but you can use UINavigationBar's UIAppearance method to set the colour just before you show it:
[[UINavigationBar appearance] setTintColor:[UIColor darkGrayColor]];
SKStoreProductViewController *storeProductViewController = [[SKStoreProductViewController alloc] init];
[storeProductViewController setDelegate:self];
[self presentViewController:storeProductViewController animated:YES completion:nil];
And then in the SKStoreProductViewControllerDelegate method, change it back to whatever it was previously...
-(void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController {
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
[viewController dismissViewControllerAnimated:YES completion:nil];
}
Works for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With