ipad rotation problem in a view based app using uinavigationcontroller
I am creating an app for ipad for the first time. i have created a view based app and in appdelegate i have added uinavigationcontroller. in myappviewController (myapp is proj开发者_StackOverflow社区ect name) screen is rotating. Then i have created a new file(right click class folder->Add->new file->ios cocoa touch class->UIViewController subclass. now i am pushing this view using
[self.navigationcontroller pushviewcontroller:secondview animated:YES];
now this view is not rotating. shouldAutoRotateToInterfaceOrientation is returning YES in both files. please help me.
Try:
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}
精彩评论