开发者

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);
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜