开发者

AutorotateToInterfaceOrientation of a UIviewcontroller Inside a UITabViewController

Hi I have an iphone app in which 2 button .when I click on the one of the button there a UITabViewController with 4 tab is opened modally. I need to rotate both Portr开发者_StackOverflowait and lanscape the viewcontroller inside this UITabViewController. I Don't need to rotate all the view controller inside the Tabviewcontroller ,Only one viewController. Please help me .

Thanks in Advance.


any view controller you don't want rotating needs define it's own version of the shouldAutorotateToInterfaceOrientation method like this

- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
    {
    return NO;
    }

To do that, you may have to subclass a specific view controller just to incorporate this one custom method

UPDATE: It sounds like you have multiple view controllers active at once.

If you place some debug code in all of your shouldAutorotateToInterfaceOrientation methods on all of your viewcontroller based objects, my guess is only one will be receiving the notification of a rotation event.

In which case, since it is difficult to know which one will receive the rotation event notification, you will have to modify them all to disseminate the notice to each other in some way.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜