How to check "Is landscape orientation allowed by user in iOS?"? - ios

Question is clear at title I think. I am asking how to get "is landscape orientation locked or allowed by user from settings" currently. (like enable disable wifi or gps). Also, how to listen enable/disable action performed by user at settings?
I am not asking for orientation change listener (viewWillTransition) or current orientation state (UIDevice.current.orientation.isLandscape).
My aim is that if landscape orientation is disabled from settings of phone by user, a button will be visible to change video orientation manually, otherwise button will be invisible and video rotation will be fired only from real rotation of phone (viewWillTransition).
I tried to explain my question in detail because when I googled there are so many questions about (viewWillTransition) and (UIDevice.current.orientation.isLandscape). No answer found for my question.

Not possible, the lock is handled by the OS and is transparent to the app.

Related

Delegate fullscreen event AVPlayer objective-c

After several sleepless nights, I don't have any more ideas how to do what I am trying to do.
In short words, I am trying to allow my fullscreen video to be accessible in all orientations (landscape and portrait). This is the only place in the app where I want to allow that. All other views are locked to portrait.
My idea was to delegate fullscreen enter / exit event and in that place, programmatically set orientation allowance, so on fullscreen enter, unlock landscape additionally and on fullscreen exit, lock back only to portrait. Everything works fine apart from the one crucial part...I can not delegate fullscreen enter/exit event (delegating those events was my idea but I might be completely wrong and that should be managed in completely different way)
I am using this library: https://github.com/brentvatne/react-native-video
Thanks in advance for any help!

Is it possible to programmatically force an iOS app in split view / slide over to go full screen in ios9?

I'm implementing an app that needs a camera preview using AVCaptureSession. Unfortunately iOS9 will interrupt the AVCaptureSession as soon as Split View or Slide Over is on. The system allows to detect such an interruption (see: https://stackoverflow.com/a/33086527/1896336).
The good thing is that we can warn the user to go Full Screen but I was actually wondering if we could programmatically set the app to go Full Screen when the user taps a "yes take me back to full screen" button ?
No. If you don't like this behavior, don't use iPad Multitasking (opt out by insisting on full screen in the Info.plist).

iOS, is there a way to programmatically turn off three fingered zoom

I have an iPad app that is being used as part of a museum exhibit, it runs in guided access mode. I have enabled three fingered zoom on the iPad for accessibility. Users are finding it confusing if the previous user has entered the zoom mode and left it zoomed in.
The app times out and enters an attract mode after it is inactive for a period of time. When it enters the attract loop I would like to leave the zoomed mode, is it possible to do this programmatically or does it have to be done manually?
It has to be done manually. Your app can't communicate with the accessibility features. It's true that three-fingered zoom on the iPad can be confusing; I've triggered it accidentally and confused myself! But for that very reason I suggest that you do not turn on this feature in your kiosk iPad. A better option would be to enable some form of zoom within the app itself. That would be something that you can turn off programmatically.

How to set focus mode in UIImagePickerController

Actually the question is in the title of the question.
In AVCaptureDevice there is a property - Focus Mode.
There is no such thing in UIImagePickerController.
So the question is how can I manage focus settings in UIImagePickerController?
You can set manual focus by tapping on the screen like in standard camera app.
Any other focus settings, which Camera app doesn't have, are not available (at least in legal way).

Is there a message when the iPad is covered? I Want to mask the app for privacy purposes

Question: Is there a message/event fired when the iPad cover is flipped closed?
Purpose: I have an iPad app that collects private information, such that when someone enters the room, a user might flip the cover closed. It makes sense -- and a user has requested -- that the app close itself or otherwise mask the users information should someone else then pick up the iPad.
Thanks.
Someone was suggesting to use the AppDelegate's applicationWillResignActive and applicationDidBecomeActive delegate methods and instantiate the accelerometer. When the device is locked (cover closed), the accelerometer is disabled and won't register events, but if the app is in the background, it's still active. Never tried it but it might work.
Explanation here

Resources