I have this simple storyboard :
all of those UIViewController background are clear (transparent), but I put background image as navigation bar and window background using this code :
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// window background
self.window.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"window"]];
// navbar background
UIImage *navBackgroundImage = [UIImage imageNamed:@"navbar_bg"];
[[UINavigationBar appearance] setBackgroundImage:navBackgroundImage forBarMetrics:UIBarMetricsDefault];
[[UINavigationBar appearance] setShadowImage:[[UIImage alloc] init]];
return YES;
}
usually this code works on iOS 6 without flashing, but today when I try to build it on iOS 7, the segue animation (push) is flashing. It seems that the UIViewController background is not fully transparent.
please take a look at this video : http://www.youtube.com/watch?v=-oZc9SwPJjs
thank you
I faced the same problem some time ago, view controllers with transparent background makes this "effect", that actually is not a flash, it is the animation of the view sliding over the other view. The only way to solve this is removing the animation of the push, indeed I don't think you need this animation, so take a look on the answer of this question, it shows how to change it:
Change animation transition
Or take a look on this, he has a sample code, that you can just download and see how it works:
http://www.captechconsulting.com/blog/tyler-tillage/ios-7-tutorial-series-custom-navigation-transitions-more
Hope it helps!
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