Where to change orientation restrcitions in Interface Builder - ios

For an iOS 7 app, I have a storyboard with a simple UINavigateController and a ViewController. I remember having limited the navigation and/or view controller to Landscape, and now I can't find anymore where I had changed this. I am not talking about the appearance of the controller on the Interface Builder screen, but the supported orientations. I tried to override it in the code, but it doesn't help.
Any clue where to find this again ? Thanks.

If you want to restrict the orientation on iPhone you can easily click the project on the navigator and when you click, go on the general page. Below you can uncheck the orientations you don't want.
Just keep in mind, you cant lock orientations for an iPad app. An iPad app should support all the orientations. (based on the apple Human Interface Guidelines)

To change/restrict the types of orientations of your app from your Interface Builder, Try these steps.
Open up your project navigator and click on your project.
You will see a screen like this.
Under the general tab, See the Deployment Info Options. There you check/uncheck the types of orientations you want to keep or not.
Hope this helps.

Related

How to implement Split Screen Multitasking on iPad using Third party apps?

I tried to implement the Multitasking feature Apple provided using AIR application, but I seem to miss something.
I did the following as apple recommended:
Compiled the app with iOS9 SDK.
All orientation implemented.
Storyboard added.
Still I do not see the vertical bar that divides the two app's for multitasking.
Let me know if you implemented this successfully in any third party apps?
All 3 listed steps are correct. Please also make sure Requires Full Screen is set to NO. It works perfectly for me.
Please let me know if you (or anyone else) still have trouble with Split View support.
What iPad are you using to test your app? Not all iPads support this behavior. This table shows which iPads support Slide Over, Picture in Picture and Split View:
Documentation from Apple for more information.
By the way how did you manage to use launch screen storyboard with Adobe AIR application?
Split screen wasn't working for me because even though I had a Storyboard, I wasn't using it. Make sure your Launch Screen File is set, and your Launch Images Source is blank.
Check off Portrait, Upside Down, Landscape Left, and Landscape Right under Deployment Info. Also make sure that Requires full screen is not checked off.
Finally you should double check that your Info.plist is correct. UIRequiresFullScreen should be NO. Supported interface orientations and Supported interface orientations (iPad) should have all 4 orientations.

How do you change orientation in iOS

I have made an iOS project but don't know how to lock the orientation. How do i do that?
EDIT: i tried adding it programmatically but didn't work
You can go to the project settings and below you have 4 options remove or add checkmarks to change orientations.
If you go to your Xcode project in the navigator (should be the very top file) then go to the General tab for your main target, there will be 4 check boxes under the title Device Orientation. Select those based on the orientations that you would like to allow

How to add support for Landscape mode in existing app

I have implemented an iOS application for both iPhone & iPad, supports only in Portrait mode with OS iOS 7 & above. Now I need to add support for Landscape as well, and I do not have much knowledge on Auto layout and Size Class. Do I need to create separate xib's for Landscape mode? Please share your best suggestions and thoughts.
Please have a look into attached screenshot for how to use SizeClass for design view in Portrait and Landscape Mode.
Have a look into this image for more clarification.
Follow the steps below to add support for navigation
1) In project navigator tab, select your project
2)then select general tab and in Deployment info select checkboxes for device orientation (landscape left and landscape right.)
If you dnt wanna use size classes you can go with Autolayout.
https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/AutolayoutPG/Introduction/Introduction.html

Where is UISplitViewController in universal App?

I made an application for the iPhone and now I want to make a port for the iPad. So I changed the setting to Universal. I would like to use for the iPad version the Split View, but I do not see it anywhere (I use Storyboard). Please help. Thanks
Check the object library in the lower-right corner:
After you switch the app to universal you have to create a separate iPad storyboard. Goto New File and under User Interface choose storyboard. When you click next it will ask you device family, choose iPad. After you create the storyboard and go there you will see the Split View Controller as in #Aaron Brager answer.

Create universal app using iOS StoryBoard that have different UI

I'm new with iOS and yesterday i learnt about storyboard. it works great. i refer to this link. I tried to create iPhone apps with a storyboard.
But now i want to create an universal apps, that means for iPhone and iPad. but also using the storyboard. lets say if i have the same UI, that wont be an issue. Same UI means, my iPhone UI using tab bar controller, my iPad also use a tab bar controller. I just need to point to the same class, and the result will be the same. Now, i want have a different UI. my iPhone will use a tab bar, but my iPad will use a split view.
here is my question :
is that possible to do that with device target universal? i mean iPhone with tab bar, iPad with split view.
if yes, how can i know which device is running? either i choose iPad or iPhone. How can i know i run on iPhone/iPad? what should I validate in the appdelegate?
For ipad storyboard, i drag a split view controller but i can't see any master detail whenever i run the apps. how can it be like that?
thanks. :)
If you create a Universal application (an application that supports both iPhone and iPad), Xcode will by default give you two Storyboards - one for iPhone, one for iPad. Under your target's settings you'll see a place where you can configure which Storyboard presents the main interface - you can set this separately for iPhone and iPad:
The OS will take care of loading the correct Storyboard for you.
If you want to detect in code whether you're running on an iPhone or iPad, you can use USER_INTERFACE_IDIOM(). For example:
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
There's also UIUserInterfaceIdiomPad for iPad.

Resources