Possible Duplicate:
iOS 6 shouldAutorotate: is NOT being called
I need an method to knows when user change the orientation...
I have tried
-(BOOL) shouldAutorotate { //never called
UIInterfaceOrientation toInterfaceOrientation = [[UIDevice currentDevice] orientation];
if(toInterfaceOrientation == UIInterfaceOrientationPortrait)
//a code here
return YES;
}
How can I know when the user change the orientation of iPad?