App run on simulator does not respect points or fonts from storyboard [duplicate] - ios

This question already has an answer here:
How to efficiently use Autolayut and Auto-Resizing in same target?
(1 answer)
Closed 5 years ago.
I am working on new features (with Swift) on a legacy project ( Objective-C ) project.
Everything that I am receiving from designer (dimensions in points, font dimensions) put into storyboard or xib files got bigger in old project.
In SIMULATOR, here is an example with a uiview height and font dimension for iPhone 7
We tried:
Designer gives all dimensions in points. He is currently designing for iPhone 7/6. I am using in storyboard iPhone 7 view.
In a new project the correspondence is 1:1.
In the legacy project everything shows a little bigger.
What shall I search?

The iPhone 6 was introduced alongside iOS 8 and Xcode 6. As part of the introduction of the larger screen sizes, a legacy path was created that would allow older apps to run in a mode as if they were on an iPhone 4/5 screen size, simply scaling up the interface. This was intended to give app developers time to opt into the native, larger resolution of the iPhone 6 and 6 plus. In your question, I noticed this:
The larger battery icon is from your legacy app, while the smaller is from your brand new application. The contents of the status bar being scaled is a sure tell sign that the app is in this legacy mode. (Also, the interface often appears kind of fuzzy)
Therefore, I think your legacy app must have never adopted the launch screen storyboard or xib file that is needed to take advantage of the native resolution of the larger devices. To adopt it, you can see this answer.

Related

Why ViewControllers don't completely fit the screen in an iPad? [duplicate]

This question already has an answer here:
iPad screen doesn't support autolayout
(1 answer)
Closed 4 years ago.
When I launch my app in an iPhone, the UIViewControllers fit the screen. But in an iPad, the result is this:
The UIViewControllers don't fit the screen. Why is this happening?
Thats probably because use set iPhone as device in deployment info of general tab in target settings.
iPad can open iPhone apps by default but without any modification on it's layout. then you have a button on lower right corner to zoom in.
If you want your app to support both iPad and iPhone in a native way, you should pick universal. BUT BE CAREFUL! Once you pick universal and upload it tho appstore, there is no way back to change it to single mode (iPhone/iPad only) and you shod continue supporting all platforms. The only way is to delete project entirely and create new one and it means that you may loose all of your users by loosing continues delivery.

Storyboard Sizes for iOS 11?

I currently use Storyboard for Screensizes.
The following storyboards I use are:
iPhone55.storyboard
iPhone47.storyboard
iPhone4.storyboard
iPhone35.storyboard
Each Storyboard corresponds to the screen size in the name.
Now with the iPhone X out, I need to create a new storyboard for this screen size.
However, my question is, what screensizes must I account for, with iOS 11?
And just out of curiosity, what screensizes must I account for, with iOS 10?
I'm finding conflicting information, so I thought I'd reach out here for clarification.
I'm thinking of making this update for iOS 11 users only, meaning I may be able to drop some older storyboards.
Thanks.
Separate storyboards for different screen sizes is a quick route to maintenance nightmares compared to Auto Layout, but whatever floats your boat...
That said, your set of supported screen sizes is correct for iOS 9 (which supports devices as far back as iPhone 4s, a 3.5" screen). iOS 10 drops support for 3.5" devices, but still supports 4" devices (iPhone 5s and iPhone SE, the latter of which remains for sale and will thus likely be supported for years to come). iOS 11 drops no further screen sizes (but does drop some... uh, bit sizes?), and of course, adds iPhone X.

Supporting multiple iPhone resolutions with a single storyboard

We all are going to update our apps to iphone 6 and iphone 6 plus. That means we need to support 4 sizes.
1.) 3.5
2.) 4
3.) 4.7
4.) 5.5
Can we support all these screen sizes with single xib or storyboard ? also please share your views on how we can update our existing apps for iphone 6 and iphone 6 plus.
Yes. See Apple's iOS8 documentation specifically, size classes:
iOS 8 makes dealing with screen size and orientation much more versatile. It is easier than ever to create a single interface for your app that works well on both iPad and iPhone, adjusting to orientation changes and different screen sizes as needed. Design apps with a common interface and then customize them for different size classes. Adapt your user interface to the strengths of each form factor. You no longer need to create a specific iPad storyboard; instead target the appropriate size classes and tune your interface for the best experience.
There are two types of size classes in iOS 8: regular and compact. A regular size class denotes either a large amount of screen space, such as on an iPad, or a commonly adopted paradigm that provides the illusion of a large amount of screen space, such as scrolling on an iPhone. Every device is defined by a size class, both vertically and horizontally.
There is also a very good tutorial video on the WWDC site.
In order to stop your iPhone 6/6+ app being scaled, add a launch image of the correct size or better, use a launch storyboard.
From there you should use AutoLayout and avoid hard coding to screen sizes. In the long run it'll be a lot less effort and less error prone.
In existing projects you can use autoresizing or auto layout of xib files.. that support all 4 devices.
I have implement my projects using autoresizing to support all devices.

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.

Resources