Development for smaller screens [closed] - ios

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
We are developing application in Xcode 6 with deployment target of iOS 7. I was wondering what is best practice or how do we define that some UIViews should have different height on 3.5 and 4 inch screens? Our designer made graphic design of the application in photoshop for iPhone 6/6+, but it doesn't fit vertically well on smaller screens, so we can make everything a bit smaller, but the question what is the best practice doing this in code and/or in storyboard.
BTW: I am used to do everything in code as I don't like working with IB

Best practice is learn how to use AutoLayout to make constraints that adjust according to the screen size. This takes a lot of trial and error, playing with priorities etc. and if things change in a view you often have to fix a lot of constraints to get it working again. You could also build views and/or constraints in code, but I don't have much experience with that.
Alternatively you can make different storyboards for different screen sizes, but then you'd have to manage the two different versions.

Related

iPhone 6 Autolayout issue [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
A year ago i created an iphone app with xcode 6, i addded the autolayout, everything works fine on iphone 5 and iphone 6, but earlier i created a new app which is a duplicate of the older app, i added also autolayout but nothing works normally on iphone 6, the size of images, buttons are small however i added the #1X and the #2x size. i used the sames ressources as the older app.
The difference between older app and the newest one is that before i use ModalViewControllers but now i use ContainerViewController and switching between views.
I did not understand from where it comes the problem.
This is a screen shot of older app on iphone 6
And This is a screen shot of the newest app on iphone 6
What can be the problem?
Thank you for help.
It is unclear from your question what your problem actually is (both screenshots look fine), but I guess your issue is that on the second one the elements are somewhat smaller in proportion to the screen, is that it?
If so, that's because the first one is running in iPhone 5 (4" screen) emulation mode, just scaled up to take more space on the larger screen, while the second one runs in native iPhone 6 mode. The views are actually the same size as on an iPhone 5, they just take less space in proportion to the size of the screen (that's the goal of a larger screen).
Check the SDK version the app is build against, as well as the presence of a Launch Screen XIB, I believe those are the triggers for switching to the native mode.
If you want (some) UI elements to be larger on larger screens, you can use height or width constraints with multipliers, but fonts are trickier, you'll need to handle that in code.

View resizes in iPhone 6/6 PLUS (wrong size) [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
When switching to Xcode 7 i experienced some problems with iPhone 6/6plus screen sizes. I had an iPhone 4-sized view with black bars on top and bottom of it.
I read that i had to load appropriate launch images so I did it. The bars disappeared but the only views that scaled properly were the Tab bar and status bar (with wrong launch images i managed to fill the whole screen but the status bar was zoomed). The whole content stays 'windowed' and I don't know how to change it. Can anyone help me ?
You must use proper autolayouts Or Autoresizing Properties to make it look good on all the Devices.

UILabel doesn't show at the center on iOS Simulator (Xcode 6) [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I'm doing a tutorial where I have to change a label's text.
On the storyboard, I align my label's center, but when running on iOS simulator it goes to the bottom right.
I think it's because of the device that is set? On this tutorial it says to set to retina iPhone, but I can't find it.
I have iPhone 4s, 5, 6, and 6 plus, and and some iPads.
Can someone help me?
You need to learn about Auto Layout and more specifically how to set constraints so that your UILabel is at the center of any device running on iOS Simulator.
There is Ray's Video Tutorial on Auto Layout and the Beginning Auto Layout blog post for iOS 7. Maybe you give the rich Apple documentation a chance: Auto Layout Guide

Interface Builder design adaptive to different screen sizes [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
How can I adapt my viewers to different iPhone screen sizes? Any link helps, thanks.
You have asked a very strange question. The iOS Simulator allows you to test builds of your app during the development process for various iOS devices -
Furthermore, since you mentioned Interface Builder - you can use the form-factor button to switch between Apple Retina 3.5-inch form factor and Apple Retina 4-inch form factor while working on Storyboard -
UPDATE
Here is a good blog post, which can answer your question about iPhone Simulator skins on Retina Display. Also, if you want to stick with non-retina simulator you can use -
iPhone Simulator >> Window >> Scale >> 75% or 50%
You need to learn about Auto Layout and more specifically how to set constraints.
There is Ray's Video Tutorial on Auto Layout and the Beginning Auto Layout blog post for iOS 7. Maybe you give the rich Apple documentation a chance: Auto Layout Guide

Retina 4inch simulator is misplacing everything in my app [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
After upgrading to xcode 5 then when I test my app on retina 4 inch screen, it misplaces some of the objects I've put in my app. I tried everything and only have one solution that may work but would be very annoying to do. It is the screen detection method. I really don't want to go through the hassle changing a lot of my code just so that it can be compatible with a 4inch retina, because I would have to rewrite a lot of code just for a 4inch retina display... Is there a way to make it so that everything could be stretched to fit to screen?
Two possible Solutions:
For all of your nib (.xib) files or Views if using Storyboard, select View and set Size parameter value as "Retina 3.5-inch Full Screen". But using this one will fix your app screen height to 3.5inch.
In Inspector-tab, for every view items like labels, buttons, etc, set "Autosizing" parameters to stretch, reposition, fix or flexible positions and sizes of items according to change in screen height.

Resources