views:

62

answers:

1

Hello friends, 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?

+1  A: 

Implement this in the -didRotateFromInterfaceOrientation: method.

-shouldAutorotateToInterfaceOrientation: should only be used to determine whether the target orientation is acceptable, and nothing else.

KennyTM
Thanks kenny...-didRotateFromInterfaceOrientation: method lead me to right answer...
Mahesh
@Mahesh - If he answered your question, you should mark the little checkbox to the left of this answer in order to accept it.
Brad Larson