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
Related
i developed an iPhone app.look at the pictures, the view controller only set to support portrait.i install it on iPad air,when orientation is portrait ,everything seems to be ok.but when the orientation changes to landscape,the view on iPad was cut by 2 parts and a wide black line,it's iOS8 system problem i think, because i never add code for this kind of situation.also happens on iPad mini,but the simulator was ok.Any body knows why ? if it could be fixed,any solution ? thank u guys so much for any suggestion!
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
I have a universal iPhone/iPad app that I'm in the process of completing. This is a music listening app that connects to and allows you to listen to music off of a user composed music site.
Since the user base for this app will be very small I've decided to put iAds in to try and get a little recovery on the programming costs.
The app is xib-less meaning that I create all components and draw every view manually. I have all of the code in place to place the iAd on screen and off screen for its various states. My app supports all rotations of all devices and my screens correctly reposition all components for every possible orientation.
After digging deep in the documentation I found that Apple always displays tapped on iAds in portrait mode. If my device is in portrait mode (upright) then there is no problem. However if I'm in landscape or upside down (yes it makes sense for this app), then the iAd displays in portrait but when closed my app is a mess.
The best way I can describe it is that each of my display items has a frame which I manually set to position it where I want it for each orientation. This works perfectly until the user taps on an iAd. The modal iAd dialog comes up then after it is closed even if I force a reposition of my components nothing draws correctly.
I've checked the view frame coordinates before and after the ad and I see some minor shifting. But what is so strange is that my components even when forced to their frame locations I desire are just a mess.
Any help would be greatly appreciated. Here is a link to the screen movie incase
embedding doesn't work: http://www.screencast.com/t/1pSwUI3EiMF
I'm making an app for the iPad with TV output to an extra screen. Everything works fine, but for some reason the TV out window disappears when I put the iPad in landscape mode. I commented all the code that makes it go to landscape automatically but as soon as I rotate in iPhone simulator, the tv output window goes away.
Is it just not possible to have the device in landscape mode with an extra screen or is there something I'm overlooking?
Thanks in advance.
I've noticed there's a CALayer use-after-release bug in iOS7.0.3 simulator when you have setup an External Screen triggering at some point, but a later iOS7.1 fixes that. Can you confirm if you have the problem with iOS 7.1 ?
So after wasting many hours trying to get my app to run in landscape mode by defualt I'm looking for an alternative.
My idea is to create the app in portrait mode but rotate everything by 90 degrees, the player thinks that he is playing the game in landscape mode (when really I've just rotated everything). I recognise it will be a little awkward to develop but I come into all sorts of issues when I try to program for landscape.
My question is, does Apple frown upon this? Could they reject my app for any reason or is this safe to do? Are there any issues I should be aware of?
Advice/articles/help all appreciated.
I do not allow landscape mode in my applications and none of them have been rejected. Sometimes an application does not benefit from being in landscape mode.
EDIT: The same also goes for portrait mode. If your app makes sense only in one orientation or the other, Apple will not reject you.
There is a key you can put into your Info.plist to make it start in landscape (see here). Or have you already tried that?
There are reportedly immersive full screen Open GL games that hide the status bar and do this. Note that you will still need to detect and handle landscape-left and landscape-right rotations or your app might appear upside-down.
Just set an affine transform on your top-level view, and be careful to always use the correct coordinate system.