Hello everybody. I have a Main View that contatins uitableview, and i am pushing another view when the user taps on a row. I want only the child views to rotate and have written code for that. But the problem is once i push the view, it also enables the orientation on the Main View. when i rotate the main view to the left, the statusbar also changes to the left. i have not applied any orientation on the Main View. i have done the following on the MainView but code still the status bar doesnt change.
-(void) viewDidLoad
{
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(receivedRotate:) name: UIDeviceOrientationDidChangeNotification object: nil];
}
-(void) receivedRotate: (NSNotification*) notification
{
UIDeviceOrientation interfaceOrientation = [[UIDevice currentDevice] orientation];
if(interfaceOrientation != UIDeviceOrientationUnknown)
{
if (interfaceOrientation==UIInterfaceOrientationLandscapeLeft)
{
[self shouldAutorotateToInterfaceOrientation:interfaceOrientation];
}
}
}
can somebody plz help me????its kinda urgent... How can i disable interfaceOrientation in the Main view