In the simulator this does not seem to happen, because you can't tilt the simulator.
When I run a UIWebView on my device and tilt it seems to slide down and leave a gap of 44px, it seems to be the height of the NavigationBar at the top.
I don't have any code to post as I do not what is causing this.
When I go to another view and come back to this, the gap is gone as the iPhone didn't move between appearing.
Any ideas on what to do to stop this behavior?
I am using iOS 6 and Storyboard, if I can post anything to help, please let me know.
I have posted a screen shot from my device to show what is actually happen.
Well this can happen because of Auto Layout there might be a constraint that set it 44px below,
Check it out
Hope this will help ,
Further you can get the basic idea about AutoLayout feature from Ray Wenderlitch site http://www.raywenderlich.com/20881/beginning-auto-layout-part-1-of-2
Related
I have asked this question before but maybe due to my bad explanation unfortunatly I did not get a reply. I am still having the issue with my spritekit game that is in landscape only.
When I lock my device or sometimes just switch to another portrait app, and than return to my game it is forced into portrait mode for 1-2 secs. This does not happen with other games and I do not understand what I am doing wrong.
I have set orientation to landscape left and right only (in Targets-General), changed the orientation settings in GameViewController.swift and also changed the Info.plist settings for "supported interface orientation" to make sure it is only landscape left and right.
What am I missing? I would appreciate any replies. Thank you very much
So it turns out after ages of research that it is the iAd Banners that cause this issue.
To fix it simply remove them from the superView in AppDelegate when application "WillResignActive" and reload them when application "WillEnterForeground".
Credits goes to Iganton
Background app screenshot showing wrong orientation after double tapping home
I am trying to figure out what settings for the UIImageView below will work with all device sizes.
I'm getting no luck with every combination I've tried.
Here's the .xib:
When I run this on a 4" the image is shifted down much lower from the top label and the buttons stay put.
I have the top label set to Top, tried Aspect Fit/Fill for it as well, didn't change anything. Seems to be an issue with the UIImageView. Also saw someone mention try clip subviews, have that selected, still can't keep it the same size and orientation when going back and forth from 3.5" to 4" iphone on device and simulator.
Hope this helps, in your case you should keep it to the default setting, no change required..
First if turn off the Autolayout setting from XIB.
Now visit my answer here.
I just finished up my storyboard based iPhone app (I'm developing on an iPhone 5). Just before submitting it to the Appstore, I thought of making sure everything looks fine on an iPhone 4. So I launch my app in the simulator with iPhone 4.
And what I see baffles me. Basically every single view object, particularly textview, are stacked on top of each other. Basically everything scrollable's messed up. In some textviews even, the initial scroll position has been set to say 100px, which means that the textview's showing the middle of the content in a textview and there'sno way to scroll to top.
Every time I make an ajustments to the storyboard view to fit the iPhone 4, the view on iPhone 5 instead looks weird. Most of the time, the stacked objects on iPhone 4 simulator can't even be unstacked.
Am I the only one experiencing this? I cant find any post about it. Could it be that there's something messed up with my simulator? Any setting I've missed? The only solution I can think of now is to have a seperate SB for iP4 and iP5, but I really would rather not go through the pain of doing that. Any comment or idea is greatly appreciated.
How it looks
You need to make sure that your autosizing struts and springs are set appropriately.
The views need to either dock to the top, or bottom and the views that you want to stretch should have the flexible vertical set.
When I launch my iOS app it seems that I only get a black screen on both device and simulator. I'm running Xcode 4.4.1 and the iOS sim is set up for 5.1. Is there any information you can give to help me out here? I'm pretty sure it's the viewController, but I'm not sure.
No background image
No change in colors
Basic App (Text boxes/Ad Bar/Nav Bar/Table Cells)
- All objects are available in Xcode (haven't messed with the coding yet)
screen cap img link: http://imgur.com/T4QUI
Code to come!
I've been working on this app all morning and I think I figured out my problem. So it turns out the problem was the "Ad BannerView" that I had put on the main View. Deleted it and it simulates just fine.
Not sure what caused it to do that, and if anyone knows, I'd very much appreciate a little bit more learning.
If you guys have anymore advice for me on here or in Xcode I'd love to hear it.
Thanks a ton for the help guys!
i Know i am late but i am posting it, If it could help someone else.
You may probably removed your initial viewController, You can set it by followed
Go to main storyboard
select viewController you want to show up first
in attributing inspector you will see "Is Initial ViewController" with a checkbox
mark is checked(tick sign) and give it a run.
You have to provide image for that the size of image for iPhone should be 320,480 and 640 , 960 with name Default.png , Defauld#2x.png , and image should on root of aproject.
or you can select your image form XCode.
I have a Navigation controller in my app that pushes my homeview on load. The Home View has a subView which actually has the content (I plan to put another iAdBannerView later). The contentView(SubView) has a background image which is aligned with some text/label on the view to give a better look. Everything displays correctly in simulator (3.2 and higher versions).
I installed this in a 3.1 iphone device last night and it looks like the background image gets cut off from the top. It is almost like the view started at the correct position (after navigation bar) but the background image started from the top.
There is unfortunately no simulator for iOS 3.1 so I'm not able to reproduce this anywhere except the device. Even if I could reproduce, i'm not sure how to fix this because everything seems to be set up correctly. Is it a bug in 3.1. If anyone has experienced anything like this, could you please share?
Not sure what really happened. but I was able to change the height property of the content view to 520 or so and it started working fine.