I'm developing an iPhone and iPad app with latest SDK and Xcode 4.5.2.
My client said me that the app has to support iOS 4.3 and above.
So, if I target iOS 4.3 I can't use:
Storyboards.
Auto-layouts.
I have to create XIB for every ViewController, but:
What must I do to support Retina 4-inch screen?
and
What must I do something to support iOS 5?
Simply design your app for 3.5" screens, and make judicous use of autoresizing masks.
For supporting Retina 4-inch screen, here is good answer to that
and YES Storyboards and Auto-layouts are not for iOS 4.3
More on iOS 5, you don't need to do and special coding for that
and YES you can support Retina 4 inch with deployment target set to iOS 4.3
Hope this info helps you..
Have a look at these two links
Screen size of iphone 5
Naming convention for iPhone 5 images?
I don't see why these wouldn't work.
Move from comments
#VansFannel I would do this in code and not actually on the xibs. So I would have something like
if(IS_IPHONE5()) {
// do one layout
} else if(IS_IPAD) {
// do this layout
} else {
// do the final layout
}
In info.plist file remove the option of Launch screen interface file base name and you wont get the issue
Related
can anyone help me how to design landscape UI design in iphone and ipad for xcode 13. previously xcode versions we have an option like Vary for Traits directly. in current version no option for vary for traits.
You can add constraints variations here:
I'm building an iPad application on landscape orientation on xcode 6.
I used size class
(hRegular wRegular)
.. And it looks good on iPad with iOS8 ..But when i ran it on iPad with iOS 7.1 .. The views is just not appearing.
I tried to target even
(hRegual wAny)
but it's the same..
The funny thing that the only size class accepted by iPad on iOS7 is (hAny wAny)
Hope that anyone can help me in this.
============================
Update
here is an example project for what I mean
iPad Project
When deploying an Application With Size Classes on earlier iOS versions; most size classes are backward compatible.
Following are the key points when using Size classes:
The app is built using Xcode version 6 or later
The deployment target of the app is earlier than iOS 8
Size classes are specified in a storyboard or xib
The value of the height component is not compact
For more information on this subject, Check out this Answer.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to deal with iPhone 5 screen size?
How can I add support for 4-inch iPhone 5 displays to an iOS app in Xcode?
Is this even possible with the latest public Xcode release, v4.4.1?
Add a new launch image named Default-568h#2x.png to your project and it will work!
If your application is iOS6 only, the easiest way to make views that layout correctly in both 3.5-inch and 4-inch iPhone 5 designs is to use AutoLayout in your XIBs to make them adapt their size automatically (See the WWDC'2012 video sessions about that). If your application must support versions prior to iOS6, then you can still use AutoResizingMasks on your views to make them resize themselves to adapt to both 3.5 and 4 inch screens.
Then for your application to support the 4-inch display and take the whole screen when launched on an iPhone 5, simply add a "Default-568h#2x.png" launch image to your project.
The simple presence of this launch image will make your application launch full-screen on iPhone 5 instead of having black bands at the top and bottom.
Short answer : use the new launch image slot ( the Retina 4-inch ) one in XCode->Targets->Summary->iPhone/iPod Deployment Info
I have an OpenGL ES 2 app that despite all options I checked, nothing worked. Creating a new GLGame project adds black launch images for Retina 3.5 inch and Retina 4 inch. Despite every other comparison to project settings or .plist file I found nothing else to say "make it available for iPhone 5". I sure hope this changes in the future.
I have Xcode 6 beta installed and I'm trying to develop an universal app. Before Xcode 6, you had to create 2 separate Storyboards for iPad and iPhone and you could set it in the Deployment Info.
In Xcode 6, it seems that separation is gone. There aren't 2 tabs to set the storyboards individually.
But when you go to create a Storyboard, you are asked to choose a device family.
Can someone explain what's going on in Xcode 6 please?
Thank you.
To support the new Size Classes, you'll need to enable "Use Size Classes" in the File Inspector of your storyboard. This will allow you to configure your storyboard for multiple device sizes.
Note that this will make your storyboard incompatible with Xcode 5.
When you've enabled this, you'll see the size selector appear at the bottom of the screen. Use this to select your device size:
In your project preferences, you can still select a different storyboard for iPhone or iPad using the dropbown box. Notice that the storyboard name will persist if you select a different one for each device.
Even though this is still an option, Apple is moving developers towards a single, unified storyboard.
It seems Auto layout is used to support all devices now, yet you can create separate storyboards? Have you tried calling the separate storyboards in code in the app delegate
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
//Use iPhone Storyboard
} else {
//Use iPad Storyboard
}
After Xcode 6 > version for using different storyboard for iPhone and iPad need to follow xcode-6-separate-storyboard-for-ipad-and-iphone
Note : For Application which does not use Auto Layout, so while adding new storyboard for iPad and disabling auto layout, a pop will appear that's where you need keep size class data to iPad as shown in below screen.
I'm making a new app for iPhone, and since all the graphics works are done for 3.5" support I don't want to change it for new 4" screens. The problem is when I'm running it in 4" simulator it automatically stretches the content to match the 4" size. I was wondering how can I force it to center the app vertically like old apps on iPhone 5?
I also configured my xibs and views:
Size = Retina 3.5"
Deployment = iOS 5.0
Use Autolayout = Unchecked
By deleting default-568h#2x.png (reference and file) from project. and also deleting the app from simulator and doing a "clean" and then "build" it will work. But there will be a warning for deleted image.
This is not possible in the newest version of Xcode.
Every new app created has automatically a default-568h#2x.png which enables the widescreen device support. You can't disable it.
But it is possible to create a new project with an older version of Xcode (around 4.4) which doesn't make this image so there won't be an widescreen device for this target.