View Single Post
Mark FX

 
Mark FX's Avatar
 
Member Since: Aug 13, 2011
Location: West Sussex, UK
Posts: 143
Mark FX has a spectacular aura about

Mark FX is offline
I think you would be better off creating a UIViewController class, then loading the xib file from that controller class's initWithNibName:bundle: method.

That way you can use the UIViewController class's shouldAutorotateToInterfaceOrientation: method, like this.

Code:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)io
{
    return (io == UIInterfaceOrientationPortrait || UIInterfaceOrientationIsLandscape(io);
}
The above implementation of the UIViewController method, will turn all views automatically
to the correct orientation.

Hope this helps.

Regards Mark
QUOTE Thanks