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

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.

Related

xCode 9.3 breaks popover view width [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 4 years ago.
Improve this question
Since I have updated to XCode 9.3 all my popover views default to a width of 320. If I go back to XCode 9.2 everything is fine and the same popover views are shown with the regular width of 1024.
This happens in my main.storyboard at every ViewController that is used as popover. If I try to overwrite the width, it jumps back to 320 again. The other views are showing normal width at XCode 9.3. It feels like the new XCode version reduces all popover views to an iPhone default width?
Does anyone has any idea, how to fix this? My app is for iPad only app (not universal).
I don't see the problem here. Here's a demo in Xcode 9.3:
https://github.com/bvankuik/TestPopover
I have a similar problem in an iPad only app with a storyboard containing several UITableViewController based scenes with varying widths and heights. Before 9.3, these were created with widths matching the storyboard. Now they all arrive in viewDidAppear with size 375x667 if orientation is landscape and 320x480 if portrait.
The solution was as follows, I had not set the content size box:

Why does the safe area not cover the width of the screen on iPad Pro 12.9" [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
For some reason, on 12.9" but not the other sizes, the safe area does not extend to the width of the screen. Why is that? And if I want something to extend to the full width of the screen, what is the best way to do that? I've tried constraining to the superview, and that doesn't work. Any ideas on what to do about this, or (best case) how to make the safe area extend to the full width of the screen on the iPad Pro 12.9", would be great.
The premise of your question is false. As these screen shots show, a view pinned to the safe area at left and right reaches the edge of the screen on the iPad Pro 12.9 inch.
Instead of asking why the safe area is not the width of the screen, you should be asking what you are doing wrong such that your view is not as wide as the screen. You did not provide enough information with this question, though, to allow us to answer that one.

Black bars above and below on iOS simulator [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 5 years ago.
Improve this question
I found a bug in Xcode 9 autolayout. My UIView with UITableView for iPhone 5s (568px height) get resized to iPhone 4 (480 px height). I don't understand why and how I can fix this bug?
As you can see, self.height for UIView is 416px without statusBar and NavigationBar (416+64 = 480px)
Inside the storyboard in the simulator for iPhone 5s iOS11, UITableView has height of 568px.
Why my application for iPhone 5s is shown as it was on iPhone 4.
Are you talking about the black bars above and below the view? This isn't an issue of how views are laid out. It's a more fundamental problem. See where the status bar (with the carrier and battery indicators) is. This status bar is not part of your view hierarchy, but it's not in the right place either. Bottom line, the entire window has been shrunk, not just the views in your app.
This is usually because of a lack of appropriate launch images (and is why we use launch storyboard nowadays). Either supply the missing launch images or shift to a launch storyboard.

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.

Resources