I have 1 UIViewController.
in that i wrote,
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
NSLog(@"A");
} in UIViewController.
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
NSLog(@"b");
}
but this method is not called
why is it so?
You may need to do two things:
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];-shouldAutorotateToInterfaceOrientationmethod – return YES for orientations you want to support.