iPad is not present the "view as" section in the storyboard - ios

iPad is not present in the size inspector of storyboard. This is the section located in the lower left side which can show you how the View Controller will look like on different size phones.
However it shows other devices. Can someone tell me how I can add iPad?

Find the xcodeproj file in the Project Navigator on the left side of the screen. Then Under Deployment Info -> Devices, pick Universal from the dropdown.

Related

How do I change the preview device in Xcode storyboard?

As you can see from the below image
The storyboard preview is of some tablet device, I need to change this to the latest iphone or iphone 4s, how can I do this? Also I know about the assistant editor and how to preview on multiple devices using the assistant editor, thats not what I want, I want to change the preview in the story board itself
You need to follow four steps.
Press Cmd + Alt + Enter(return). It will show two window.
Click on 'Manual' text. It will show menu with Last option as 'Preview'.
Select it.
4.Select device type from bottom '+' button into which you want to see preview.
In Xcode 9.2, simply go to your Storyboard and go to the bottom, Click View As and choose a device you like.
Try this:
Select view controller > click on attribute inspector > select size you want.
select any viewController and then in attributes inspector tab you can change size.
You can open the utilities view and select the simulated size for the view controller
Utitilities View

ios UI is not scalable for my storyboard

I'm new to ios.
I have created a storyboard. I gave it's view size and location.
I intended it be scalable, so I used ration size and relative spacing.
However when I run the ios simulator I see the storyboard very different on iphone 6S and iphone 5 for example.
Here is my mock:
Here is my source-code
iphone 4s simulator:
iphone 5s simulator:
what can i do to make it scale right?
You need to use Auto Layout. While in your storyboard, click your ViewController and then go to the attributes inspector (in the pane on the right side of Xcode, the "attributes inspector" is the tab that looks like a down arrow), and for "size" make sure "inferred" is selected. If it is not selected, then click the drop down menu and select it. Then when you are placing objects on the view controller scene, you must add the appropriate constraints at times to ensure that everything gets scaled properly on different screen sizes. Read here https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/AutolayoutPG/WorkingwithConstraintsinInterfaceBuidler.html

Testing multitasking iOS 9 feature in simulator

I am using XCode 7 (Beta) to test multitasking, but I could not get a way to test with it.
I just want to make sure is there anyone like me, who facing the same issue.
You can test it.
Just run ios simulator iPad Air 2 (ios 9)( because only this device supports Split View) and swipe from right to left near of middle edge of the screen
To adopt Multi-Tasking in your app, just make sure all below points followed:
Require XCode 7 (Beta 4) and later for having look in to the simulator through choosing iPad Air 2 because only this device supports Split View.
Provide a LaunchScreen.storyboard file ( instead of a .png image file as we did in iOS 7 and earlier).
In your project’s Info.plist file, in the “Supported interface orientations (iPad)” array, declare support for all four device orientations.
If you must opt out of Slide Over and Split View, do so explicitly by adding the UIRequiresFullScreen key to your Xcode project’s Info.plist file and apply the Boolean value YES. You can do this in the property list editor or in the General > Deployment Info area in the target editor.
Select storyboard, click the File Inspector icon in the right side bar. check the box next to Use Size Classes.
Reference Link
To adopt Multi-Tasking in your app. apply the following points:
Support all orientation from the target's General section in settings.
In the General section too. remove the check next to Requires full screen if any.
Select storyboard, click the File Inspector icon in the right side bar. check the box next to Use Size Classes. Check out tutorials how to use size class to adjust your views according to the screen size assigned to your app.
Then, run the simulator. Do a small drag from the right. An arrow will
appear. do a strong drag from it towards the centre.

Why are all my view controllers square shaped?

I'm trying to get it to be an iphone project, but when I drag any view controller into the storyboard, it's just a weird almost-square, neither ipad nor iphone. What am I doing wrong here? Newest version of XCode.
This is a new feature called "size classes". You can use it to create a universal storyboard for iPhone and iPad at once.
But I don`t really like it so here is how to turn off: In storyboard, open utility inspector (right), then go to file inspector (left) and now disable "Use Size Classes". Then you will get the standard storyboard.
You're not doing anything wrong. The default is to design with UI constraints so that the actual output size doesn't matter.
What you can do is set the size you want to preview your controller at in the options in the right hand pane. E.g.

xcode 6.1 iphone/ipad storyboard

Trying to design iphone UI on xcode's new storyboard:
This seem's a little haphazard for designing just iphone UI.
I expected some form of 'iphone' 'ipad' 'extendable' boundaries or lines but all i can find is this one single storyboard. is it really just the single storyboard now or am i missing some additional controls?
Starting with XCode 6, the storyboards for the iPhone and iPad have been combined using a new feature called Size Classes. That's a good thing (most of the time), since it lets you design one interface that will adapt itself to different screen sizes.
Of course, there are situations where you may want to use different storyboards for the iPhone and iPad. After all, some apps just need a whole different approach on palm and tablet sized devices.
If you want to use the new Size Classes, see one of the growing number of tutorials, like this one by Ray Wenderlich: http://www.raywenderlich.com/83276/beginning-adaptive-layout-tutorial.
If you would like to use separate storyboards for iPhone and iPad, here's how:
Start with a new Single View Application.
a. Select File|New|Project.
b. Select iOS, Application and click "Single View Application."
c. Click Next.
d. Give the project a name, then click "Next."
e. Pick a location and click "Create" to create the project.
Convert the starting storyboard to an iPhone storyboard.
a. Select Main.storyboard, and select the file inspector (the document icon at the top of the right pane) if it is not already selected.
b. Uncheck "Use Size Classes."
c. A dlialog will appear. Select "iPhone" from the drop down menu, then click "Disable Size Classes."
d. Rename the storyboard as "Main_iPhone.storyboard."
Create the iPad storyboard.
a. Select File|New|File from the menu bar. From the dialog that appears, select iOS|UserInterface. Click on "Storyboard" and click "Next."
b. Rename the file as "Main_iPad.storyboard," then save it, typically in the Base.lproj folder of your project folder.
c. Add a view controller, and make it the initial view controller by clicking the "Is Initial View Controller" check box in the Attributes Inspector pane.
Convert the new storyboard to an iPad storyboard by following the same steps as #2, above, but this time select iPad rather than iPhone when you select the platform.
Link the storyboards to the app.
a. Open the Info.plist.
b. Change the name for "Main storyboard file base name" from "Main" to "Main_iPhone.storyboard".
.c Add a new property called "Main storyboard file base name (iPad)" and give it the name "Main_iPad."
That's it! You can now create separate UIs for iPhone and iPad the way you always did.
In Utility Area select your storyboard
Show the Atributes inspector > Simulated Metrics > Size > Select Size

Resources