views:

126

answers:

2

Hello Friends,I have used multiple uiviewcontrollers in my split view based ipad application. There are web services. For some particular web services (e.g Logout) i need to remove split view and insert new view i.e Login Screen. but most of times shouldAutoRotate method of Login view doesnt gets called resulting in dumb app which do not rotate. What may be the reason behind that? What should I do?

A: 

Make sure all your view controllers return YES for shouldAutorotateToInterfaceOrientation: for your iPad build -- at least the ones that are visible at that time.

See: http://stackoverflow.com/questions/3213885/ipad-orientation-change-issue/3239351

Shaggy Frog
@Shaggy Frog: ok thanks it helps me, I wl try.Actually in shouldAutorotateToInterfaceOrientation: method i have calculated viewcontrollers size but in gives bad sizes i.e it provides prev orientation size instead current. So i have made some manual adjustment based on size. May it is affecting?
Mahesh
A: 

Make sure you have not extract a UIView from your UIViewController which shouldAutorotateToInterfaceOrientation: function return YES, and then add the UIView into another UIView use addSubView. I have encountered it before.

Tony
@Tony: actually i gone thru following link, i found that i am doing mistake by adding 2 views in window. i.e loginview and splitview. now i have presented loginview as modal view which solved my problem. Now my app rotates well. Thakns.
Mahesh