简体   繁体   中英

universal xcode 3.2.6 Landscape mode by default

How can i create universal apps using xcode 3.2.6 in Landscape mode bydefault?I need seprate .xib files for each view,Is i have to use this code - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {// Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationLandscape); }

In your plist, you should change supported interface orientations to just two items :

Item 0 Landscape (right home button)

Item 1 Landscape (left home button)

And use in each view controller:

  - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
   // Return YES for supported orientations
   return (UIInterfaceOrientationIsLandscape(interfaceOrientation));
}

I use this sample code and for making its View based i just hide its Navigation bar by using this code self.navigationController.navigationBarHidden = YES; in the RootViewController_Phone.h and in RootViewController_Pad BenellingsonPost

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM