I'm not sure if this is a bug with my code or UIKit, but I can't seem to get my app to consistently output the second UIWindow instance to the attached screen. I've read everything at http://developer.apple.com/library/ios/#qa/qa1738/_index.html#//apple_ref/doc/uid/DTS40010848 and my code matches the pattern, but there is one instance in particular where it gets "stuck" mirroring and won't display the correct window on the second screen -- it displays only the mirror of the iPad's screen.
This is on iOS 4.3.5 on a GSM iPad 2.
Scenario 1 - iPad 2 is plugged into the screen from the springboard. It is mirrored. Launching the app results in the correct behavior of showing one UIWindow on the iPad 2 and the other on the external screen.
Scenario 2 - App is launched not plugged into screen. Plugging in the screen results in the correct behavior.
Scenario 3 - App is open and displaying correct behavior on screen. Unplugging from the screen, waiting a few seconds, and then re-plugging in the screen results in the screen becoming a mirror. The code that assigns the UIWindow to that screen is run, but the readonly mirrored property of it already is true.
Scenario 4 - App is plugged into the screen and is resumed from the springboard. The external screen displays correctly.
Any ideas?
Related
I am developing this app for ipad and ios9 and at some point the user will click on a button to watch a video. But I wouldn't want the user to just see it in the split view size he's currently on (like 1/3rd or 14th) instead I would like the app to close the other open app and for it to take over the entire screen.
Does anyone know if that's possible? Thanks.
By-default, the video always get played in full-screen mode. When video playing is finished, the player gets dismissed and you will see your screen (from where you played the video). In your case, in split view controller.
Do let me know if you need further details.
I'm developing an iBeacon app. I have two beacons.
Firstly, when the app did enter background (locked screen)
- if app found the first iBeacon I show a notification
- Continue i use the second iBeacon and my iphone doesn't show notification
- But when i active screen so app reactive and show notification for the second ibeacon
I don't know why iOS doesn't show a notification for the second iBeacon after showed it for the first iBeacon in background status?
If both beacons are part of the same CLBeaconRegion, your app will only be triggered in the background on first detection. You can change this by defining two regions, one to cover each beacon.
My windows 8 store xaml app gets cut in half upon rotation from landscape mode to Portrait mode and vice versa. Upon rotation the screen gets hanged for a second and gets cut. After a pause of around 3 seconds it gets adjusted to portrait mode. To get the app adjust in portrait mode i have written a storyboard that resizes the buttons and other columns.Then we are calling this storyboard or viewstate on size changed event. We have noticed that many Microsoft apps like mail, people, news apps has the same behaviour. Is there any way to fix this? Or does all the apps on Surface take time to re-adjust? Any reason for this? How can I fix it? Please check the screen shot taken at the time of rotation..
I've integrated opentok ios sdk in my iOS 7 app, it is working fine, except this problem:
During video chat if I don't access iPhone for 5-10 seconds..then my app moves into background, causing viewer at other end to hear only audio. Video is disabled after app goes to background state.
I've observed same thing with their official example
https://github.com/opentok/opentok-ios-sdk/tree/master/samples/OpenTokFullTutorial
How can I avoid my app going to background while video chat is ongoing. Skype is working fine in this case, I want to achieve same thing.
What you want to do is prevent the iPhone from going to sleep. To do this, you cant try this:
[UIApplication sharedApplication].idleTimerDisabled = YES;
Here is iOS documentation on idleTimerDisabled
If you don't want the app going into background at all (like when the user taps on home button), you can opt to kill the app when it's not running instead of having it run in the background. To do that, check out iOS guide on opting out of background execution
If you do not want your app to run in the background at all, you can
explicitly opt out of background by adding the
UIApplicationExitsOnSuspend key (with the value YES) to your app’s
Info.plist file. When an app opts out, it cycles between the
not-running, inactive, and active states and never enters the
background or suspended states. When the user presses the Home button
to quit the app, the applicationWillTerminate: method of the app
delegate is called and the app has approximately 5 seconds to clean up
and exit before it is terminated and moved back to the not-running
state.
Hope that helped!
As suggested by Apple I have provided a launch image which equals to my home page iOS app.
At the moment I am testing on the iPhone simulator and I wanted to know if the same happens on real devices.
Everything works fine, however when I am in pages other than home page and I exit from application by pressing the button, then when I enter again, the launch images shows for an instant, and then suddenly the last viewed pages appears.
I wonder how can I avoid this "flickering" of pages. I don't know if this is important, but I am using Storyboards.
This is the intended behaviour if you immediately start the app again. See my answer to another Stack Overflow question on a similar matter.
To explain, the Default.png image is used when the OS is unable to take a screen shot of your last view state. Giving the OS a little longer to screen shot the app will prevent the Default.png being used. This is done so that the device does not just show a black screen, followed by your app popping in.
I am not aware of functionality to see if the OS has finished taking a screen shot. If this was possible you could place a UIImageView on top of your last view and do a more subtle fade out one you have control again.