I'm having real trouble here for some time. I'm not using size classes (app is for os 6 +). I'm using auto layout, I don't want to have multiple storyboards for each screen size. For 3.5 and 4 inch screen everything is ok. For 4.7 + inch it's not. So to show you what is the problem. This is for 3.5 and 4 inch screen:
This is 4.7 inch screen:
As you see, right arrow goes to the left. It has Vertical Center in container and its height is 28x28. It has right constraint 8 points like this (I've unchecked Constrains to margin):
I cannot make it work for iPhone 6 and iPhone 6 plus. What am I doing wrong here?
Related
I have my project setup on AutoLayout, works fine with iPhones 4 - 6 Plus. However, when I add in the LaunchImage for iPhone 6 and 6 Plus, the frames and constraints for the entire app no longer take up the entire screen. Instead, the entire app fits in the top left area of the screen.
If I remove the LaunchImages for iPhone 6 and iPhone 6 Plus, then the issue goes away and the elements of each View Controller once again have the correct coordinates and sizes.
I am using the following in Images.assets:
- 2x iOS - Portrait 7,8
- Retina 4 - Portrait 7,8
- Retina HD 5.5 Portrait iOS 8
- Retina HD 4.7 Portrait iOS 8
There are no warnings regarding the asset catalog, and all the LaunchImages are at the correct dimensions. I have attempted to Migrate the images over but with no luck.
When you don't provide iPhone 6 and iPhone 6 Plus launch images, iOS 8 simply scales your interface up (makes everything larger to fit).
Once you provide those images, you will now have access to the larger screen resolutions, and just because you use auto-layout, does not mean your views will resize. If you have constraints that are limiting the height and width of your views, you will get what you are seeing. I would check on your constraints on your views to make sure they are done properly and allow the view to grow when the screen size is larger than 320 x 568.
I understand that the native resolution for:
iPhone 5s: 320*568 points = 640*1136
iPhone 6: 375*667 points = 750*1334
They are both at 2x resolution.
Wouldn't that mean that if I have a UIButton of 202x43 (wxh) points in iPhone 5s and I run the app in iPhone 6, that same button should scale by 1.16 (375/320).
It is staying at 320*568 instead.
Why?
Hi I had the same issue,
Some views in iPhone 6 are not scaling properly (No launch screen added for iphone 6, +). Debugging I found some views I had 2 xibs one for 3.5 inches and 4 inches, I was loading the 3.5 inches views for the iphone 6 instead of the 4 inches xib.
if your project have a 4.7" launch image, button will be 202X43; when no 4.7" launch image, button will be scale by 1.16.
I have custom upside tab bar and using storyboards. I have followed this tutorial custom tab bar
This tutorial explains about side tabBar and I am using upside tabBar with same approach. I am using autolayout and need to make compatible for iPhone 4 and iPhone 5 both. When I design in 4 inch screen, it runs good for iPhone 5 and for iPhone 4, it cuts bottom 88 pixels(difference in iPhone 4 and iPhone 5), and if I design for 3.5 inch screen, it is good for iPhone 4 and shows blank space for bottom 88 pixels.
Actually I am newbie for autolayout and how can I implement this for my project?
Thanks in advance for any help.
This is design for iPhone 5
but it looks like this, when runs on 3.5 inch screen
When I set my emulator for 3.5 inch it works fine. It use to work fine when I changed it to 4 inch. Now the emulater is the size of a 4 inch screen. Inside is the screen set up for a 3.5 inch, where it has black top and bottom margin. It looks like the 3.5 inch display is being drawn in the center of the 4 inch screen.
My back up still works, but I would loose a lot of code I added to it.
You need to have Default-568h#2x.png as your launch image to support 4 inch display. You also need your code to adjust for the larger screen size.
I have an iPhone app that I'm optimising for the iPhone 5's 4-inch screen. I also want it to work with iOS 6. I turned off autolayout to get it to work with iOS 6. I want everything in the view to stay the same distance from the bottom of the screen for both screen sizes. How do i do this?