When I constrain a view to the left or right edge of the screen (Landscape) and compile for the iPhone 4 (my only development device) the content appears off the edge of the screen on both the device and the simulator. But the phone and simulator are off by different amounts. On the phone I have to inset the view by 12 points and in the simulator it is 4 points. The bottom edge seems to match the canvas. All edges match on the iPhone 5s simulator and an iPad simulation (didn't try them all).
My questions are:
What is going on? Is this Normal? Is it just the iPhone 4?
Should I not try to go to the edge of the screen? Do I need to inset all of my content by a certain amount? How much?
I can't test on every device so I need to know that my layout will work based on the design on the storyboard and the simulator.
XCODE 7.2.1
Deployment Target: 7.0
Edit: The view I was placing had "Constrain to Margins" checked. This is not compatible with IOS 7. Unchecking this seems to have solved the problem in the simulator. I will have to wait until I get back to my test station to see if the device works properly.
Edit 2: Unchecking "Constrain to Margins" did indeed fix the problem on the iPhone 4 device. The iPhone 4 cannot be upgraded past iOS 7.x so I guess I have to find the money to buy some newer development devices:(
Related
Both Xcode and the iPhone simulator are set to iPhone 6. The frames are updated. I even changed the simulated metrics under the attributes inspector to iPhone 5.5 inch screen.
I tried adding constraints for the width and height but received an error in Xcode every time I ran the simulator with them on so I took them off.
This seems to happen a lot with buttons and labels. Been stumped for hours, researched all I could, finally decide to post it on here.
I just joined so they won't let me post a pic of my problem because I don't have enough rep points.
iPhone 6s have the option when you first set them up to work in 'zoomed view' or normal view. if the iPhone is set up in display settings to be zoomed, then it will display as though the phone was iPhone 5/SE size, but zoomed in. you should always check your constraint's behavior on all screen sizes, and I'd also confirm if this is an issue by checking your devices' settings.
I've started using Xcode auto layout for my projects.
Auto-layout works perfectly when I'm testing on ios8 devices, it the view scales as needed.
However, things get a little crazy with ios7.
When I test my app on an ios7 iPhone 5 simulator, the app doesn't scale-up to the larger screen,
but only shows the 3.5 inch view, leaving black bars on the top and bottom of the screen.
I am using a tableView controller.
How do I scale the tableViewController up so that it fits on a larger screen in ios7?
(Like I've said, my app fits perfectly in ios8, on all screen sizes, but not in ios7.
Also, it scales fine on an ios7 ipad.)
thanks.
The Xcode (6) IDE should give a warning about this, that may not be so clear:
"Applications using Launch Screen Files and targetting iOS 7.1 and earlier
need to also include a Launch Image in an Asset Catalog."
This means you need to have the proper Launch-Images for the "Retina 4" screen,
which is 640 × 1136 pixels, and it should be configured in the assets-catalog,
just like your Application-Icons ("AppIcon"), but under "LaunchImage" there.
Once you add this 4-inch-compatible Launch-Image to your application,
iOS-7 will assume you are properly supporting the "Retina 4" screen,
and will launch the application in 4-inch mode.
I have an app on the store and I started working on the update for iOS 8 a while ago, everything seemed to work fine except for this problem I'm having with the layouts. No matter what device I test the app on, there's always a black bar at the bottom (or the side on landscape mode).
Test on iPhone 5S
Test on iPhone 4S
Is this an issue with iOS 8? How can I solve it?
I had this same issue with the thin bar along one side when an iOS 8 device was rotated to landscape. I found the solution to this problem here: Building project with Xcode 6 (iOS 8 SDK) causes landscape rotation rendering issue on iPad
The fix I did was to go to MainWindow.xib, select the Window, then go to the Attributes inspector and select the two check boxes for Visible at Launch and Full Screen at Launch.
I am trying to test an app in the simulator (3.5 retina iPhone) and am running into a bit of an annoyance. I can't see the bottom 10th of the screen...
I have tried the Cmd+3 shortcut but unfortunately that part of the screen is still missing. For example, the card should be in the middle of the screen below:
For this app, I have some components at the bottom of the screen that I can't see in the simulator. For now, I'm having to move the components further up the screen so that I can test them but it isn't ideal.
Has anyone else encountered this issue?
I think you have designed your view for the 4 inch display, and have not set up autolayout/springs and struts to layout your view correctly.
My ios app does not fit on iphone 5 screen. When I run the app, I can see blank space at the top and bottom of the screen. I have made the app compatible for both iphone sizes. But Since I have updated to the latest xcode, I am facing this issue. See screen shot. Can any one please help?
You probably may not have set your Default-568h image.
On the simulator make sure you have set to iPhone (Retina 4-inch).
You can do this by going simulator menu at the top go to Hardware->Device->iPhone (Retina 4-inch) that will change the phone simulator to the iPhone 5 version.
click here for more get information for naming convention of images [here]Naming convention for iPhone 5 images? [here]
Try setting AutoresizingMask to your container views instead of assigning appFrame.
I have faced the same problem while moving to iOS 7.
Solution comes with AutoresizingMask. iOS 7 has full Screen layout for ViewControllers.