1

I have to "convert" a rather old iOS app to the current iOS6 SDK. Unfortunately I have nearly no experience in iOS development. Short problem description.

After I made the app compile on the latest iOS6 SDK the direction autoturn was not working on iOS5 anymore. After a bit of searching I found out that I have to implement the supportedInterfaceOrientations function. And to make it finally turn on orientation change I had to change [window addSubView:tabBarController.view] to window.rootViewController = tabBarController in the didFinishLaunchingWithOptions function.

With these changes the orientation turn is working on iOS5/6 again but showing a modal login view with [tabBarController presentModalViewController:loginController animated:YES] is not working anymore on iOS5. The login view is showing, but the contents (subviews) of the login view are displayed behind the tabBarController contents. But the tabBarController should be hidden by the login view entirely.

Looks like a kind of z-index issue on iOS5. Currently I have no idea why it is working on iOS6 and not on iOS5 anymore.

How can I make my login view and it's subviews the top most view(s) again?

devployment
  • 2,121
  • 1
  • 22
  • 33

1 Answers1

0

For my understanding normally a modal view controller is always displayed on top, so it's strange, that it's not the behavior in your app..

Maybe you can try to modify the z-index of the view/layer:

someView.layer.zPosition = 1;

Or you can try to present the loginController not from the tabBarController but maybe from another Controller.

d4Rk
  • 6,622
  • 5
  • 46
  • 60
  • Found another SO question that probably explains why the modal view controller is not displaying as it should. http://stackoverflow.com/a/10151385/83224 That's more or less exactly what I changed. Made the tabBarController the rootViewController. As described in the linked answer the tabBarController might not be able to show the login controller form itself. I think I'm going to try displaying it from another controller. – devployment Jan 30 '13 at 07:37