xCode 9.3 breaks popover view width [closed] - ios

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:

Related

Xcode Using Auto Layout does not optimize the screen for each iphone model [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 3 years ago.
Improve this question
Good morning.
I have a problem creating a storyboard with AutoLayout.
I created a scroll view with Auto Layout.
The width of the scroll view is equal to the width of the screen.
The height is 0.33 times of the height of the screen.
On the storyboard, select View as: iphone8
When I upload the app to iphone8, the scroll view appears in the size I intended.
But if I upload to a other phone like iphone8+ or iponeX or ipad,
The scroll view size appears in the size applied to the iPhone 8.
In the storyboard, select View as: iphoneX
Upload to iphoneX and the screen will appear as intended.
I don't know if it's a xcode bug or if I'm misunderstanding Autolayout ...
I thought it would be ok if I uploaded it to the App Store and downloaded it.
but nothing happend.
My xcode version is 11.
Please help me...!
I think you are understanding auto layouts wrong. But this is just an assumption made due to not seeing any code . Just because you enable auto layouts it doesnt mean your app is going to be universal on each mobile phone. Think of auto layouts as a "lizard" that changes the colors according to the environment he lives in . You still have to give him the environment so he can adapt.
Likewise you still have to give the constraints to your views on one device . What it does is it uses those constraints and enables auto layouts to adapt to different mobile phones. So if in case you see a view which has 8px from the top margin in an iphone 5s it will ensure that you will have 8px from an iphone 7s+ as well.
What it really does is adapt not remake. Refer to the links below , this article describes about the use of auto layouts pretty well.
Note - if you have already done this give us some code to look into so we can be more descriptive . Good Luck !
https://medium.com/swift-india/understanding-auto-layout-item-relationships-b08a0e5689f0

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.

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