0

I am developing ipad app in which I am using UINavigationController to push another view controller. Everything is working correctly excpet push animation is not smooth. When I push the view controller , for a second I can see previous screen as I am setting the background color of view to clearColor.

But this works correctly in iOS 6. Then I noticed UIViewGroupOpacity in iOS 7 release notes from:

https://developer.apple.com/library/ios/releasenotes/General/RN-iOSSDK-7.0/index.html

I suppose this causing the issue while animating.

Does any one know solution for this issue in iOS 7? Thanks.

Also I don't have any fancy code to push view controller. I am using below code to push

[self.navigationController pushViewController:vc animated:YES];
Unheilig
  • 16,196
  • 193
  • 68
  • 98
iOSAppDev
  • 2,755
  • 4
  • 39
  • 77

3 Answers3

1

Simply add in:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

This:

[[self window] setBackgroundColor:[UIColor whiteColor]];

The final result:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions (NSDictionary *)launchOptions {    
    [[self window] setBackgroundColor:[UIColor whiteColor]];

    // Override point for customization after application launch.
    return YES;
}
Riko87
  • 33
  • 1
  • 5
0

Well you could try doing it through your storyboards in your project. All you have to do is create your view controller that is enclosed within a UINavigationController, and connect a push segue within the storyboard by holding control and moving from the one vc to the next. Then name it, and within your vc that is presenting the view, just implement the prepareSegue method:

 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
   if (segue.identifier isEqualToString:<#string#>) {
      <#UIViewController#> *viewController = segue.destinationViewController;

      // do any customization with the above variable
   }
}

Hope that helps in any way

user2277872
  • 2,963
  • 1
  • 21
  • 22
0

My issue is solved using UINavigationController+Retro.h provided by Arne in below question

Restore pre-iOS7 UINavigationController pushViewController animation

Thanks you very much Arne

Community
  • 1
  • 1
iOSAppDev
  • 2,755
  • 4
  • 39
  • 77