I have tried following code to determine current view bounds in shouldAutoRotate.. fn开发者_开发问答
UIViewController *temp1 = [appDelegate.splitViewController.viewControllers objectAtIndex:1];
float screenwidth = temp1.view.bounds.size.width;
float screenheight = temp1.view.bounds.size.height;
bt actually when u rotate from one mode to another, it provides the bound values of old one insted the fresh bound values..? Any one know that how to achieve it?
Implement this in the -didRotateFromInterfaceOrientation:
method.
-shouldAutorotateToInterfaceOrientation:
should only be used to determine whether the target orientation is acceptable, and nothing else.
精彩评论