How to set focus mode in UIImagePickerController - ios

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).

Related

Autorotate Portrait mode documents if it is showing as landscape

In my app user scans(captures photos of) documents. For uploading to the server.
I want to programmatically detect the document's orientation.
It looks like this.
And then user tap that circular arrow button and make it portrait.
Then it looks like this
I want to do this rotation task automatically.
Please let me know how we can do this, I never came across this kind of requirement.

How to check "Is landscape orientation allowed by user in 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.

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).

how can i make a custom, in-app camera for my iphone app developed in xcode?

i am making a photography iphone app and am after, upon the app being launched, the screen to be a large image where the camera is shown in the center through a hole in the picture - this should be a similar look to that of hipstamatic. since the camera would be open upon launch, i would also need a button to take the picture (but that is not a priority at the moment). i am wondering whether there is an easy way to do what i have described? so far, research has pointed me towards using the uiimagepickercontroller, but using just this did not give me nearly the amount of customization i am after - or am i mistaken and i can do as i described using the uiimagepickercontroller?
right now, this is the code i'm using for the camera - it's currently an ibaction linked to a button that launches the camera once clicked. however, as i mentioned, i would like the camera to open on its own upon opening the app
self.picker = [[UIImagePickerController alloc] init];
self.picker.allowsEditing = NO;
[self.picker setSourceType:UIImagePickerControllerSourceTypeCamera];
[self presentModalViewController:self.picker animated:NO];
[picker release];
this code not only navigates away from the current view, but it has all the controls (zoom, tap to focus, etc.), is full screen, and plays that silly animation of the lens opening.
anything you have to offer would be greatly appreciated.
many thanks in advance
zach
Use the showsCameraControls and cameraOverlayView properties of UIImagePickerController to add custom overlay above the picker (using a view with a transparent background in which you add some elements as subviews to overlay / frame / mask some parts of the picker if needed.)
You can even use the cameraViewTransform to change the size and position (i.e. the transform) of the camera view that is capturing the camera image.

Resources