Xcode Resizing iPhone 5 app for iPhone 4 [duplicate] - ios

This question already has an answer here:
Convert app from iPhone 5 to iPhone 4 device
(1 answer)
Closed 8 years ago.
I have successfully created and tested my iOS app for iPhone 5 screen size. I have disabled Auto Layout in my storyboard because I have created custom subviews. What is the easiest way to make it compatible with older device screen sizes (like iPhone 4/4s)? Do I need to re-enable Auto Layout? What is the traditional method of making iOS apps with dynamic screen sizing?

You can use property autoResizingMask of UIView to do declare the autoresizing for views you want it changed dynamically.

Related

Create iPad storyboard [duplicate]

This question already has answers here:
XCode does not recognize iPad storyboard
(1 answer)
Scenes - Use dedicated Storyboards depending iPad or iPhone
(2 answers)
Closed 7 months ago.
I'm trying to create a iPad UI for an existing iPhone app. I've created a storyboard for iPad and added a main iPad UI in the project file to
MainiPad
but it still just shows the iPhone layout, not sure what I missed. Can anyone help me figure out what step I missed?
I appreciate any help.
you can change screen size what you want need to use also you can check this content
Xcode storyboard: Why does the iPad storyboard show iPhone sized views?

App not occupying complete screen in iphone X simulator in Xcode 9 [duplicate]

This question already has answers here:
Seeing black bars at the top and bottom of the iPhone X Simulator
(11 answers)
Closed 5 years ago.
With the release of Xcode 9, we are able to test UI of our app on iPhone X simulator. When I ran my app on iPhone X simulator, it does not occupy complete screen. There is space left on the top and bottom of the Apps View.
Can anyone please tell how to remove that space, I am already using auto layouts in my app. I am attaching the screenshot of my app.
You need to add Splash screen/Launch Image for iPhone X in xcode 9.
iPhone X launch image's dimensions are 1125 x 2436
It is because of the new feature Safe Area of Xcode 9 to handle user interface design for iPhone-X.
It is required to handle user interface design for iPhone-X. Here is basic guideline for How to design user interface for iPhone-X using Safe Area Layout
Here is the developer guidelines of apple IPhone-X Development
You can solve this by 2 ways
1. Uncheck use safe area support
2. If you are using Autolayout adjust your toplayout constraint value as that achive FullScreen

app can't distinguish screen size [duplicate]

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.

how do I update my old apps to iPhone 5? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to develop or migrate apps for iPhone 5 screen resolution?
My apps use standard Apple controls. Some of them are really simple (UITableView nested in a UIView) and others are UITextView inside a UIScrollView inside a UIView
When I run the apps on my new iPhone 5, they are letterboxed. How do i update them to take advantage of the new iPhone 5 real estate?
First of all to remove the letter boxing, you let xcode know it should work on the iPhone 5 by adding an iPhone5 sized startup image which will be named Default-568h#2x.png
Straight away, your app will work without the letter box.
Then you need to move onto formatting your views to fit. From experience, every UITableView i've had has automatically resized to be longer, but most other views needed some tweaking of the Struts and Springs.

Do I have to create two views for iPhone 4S and 5 [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to deal with iPhone 5 screen size?
The new iPhone 5 has a 4 inch display.
In IB, I want to make my iPhone 5 view different to my 4S. The 4S version needs a scroll view, but the 5 doesn't.
How can I create two views (with all connected outlets) in the same xib, one which is 3.5 inches, and one which is four inches?
Do I have to create a totally new xib and include it for iPhone5 ?
I am just a bit unclear on the approach.
(I have seen other questions which don't answer this particular question)
If you would like a completely different view for the iPhone 5 then yes you should use a different nib, however I would advise that you need not use different nibs and instead use autolayouts to autosize your views accordingly so that you can have 1 codebase working across multiple devices.

Resources