UIImagePickerController move view lower - ios

I know the camera is 3:4 so there will be a black gap at the bottom.
Now I create a custom cameraOverlayView which has a NavigationBar at the top. So is that possible move the camera view lower that can fill the rest of the screen?

Related

How to constraint overlay to UIImagePickerController camera preview only

I am using UIImagePickerController() to display camera in my swift iOS app and let user take pictures. I would like to show a grid as overlay so I started implementing one as .cameraOverlayView
The problem is that the overlay image or views will spread over the black bars on top and bottom of the camera view. This is undesirable as the grid line will run over the camera button, cancel button etc.
I could not find a method to access the frame of the camera preview window to constraint the overlay just to that. What am I missing?
Actually, this may be a little annoy, there is no way to get the sizes of those bars or the camera preview area, and you can't achieve the subviews of UIImagePickerController and so you can't add constraints for that.
But, you can use the fact that the preview camera area aspect ratio is known as 4/3 always and the overlay width should be the width of the screen and the height should be the (widthScreen / 3) * 4
another way is to set imagePicker.showsCameraControls = false and build custom controls with the overlay on fullScreen.
(use the imagePicker.cameraViewTransform in order to set the camera preview area frame full screen).

Desaturate colors in views below a UIView

Is it possible to set a backgrounds image such that the views drawn below it are desaturated, rather than just darkened or tinted via a normal alpha value.
I do not have the ability to alter the views below, so it must be contained to the UIView or layer.
Thanks!
Sure, just overlay the view with a screenshot (How Do I Take a Screen Shot of a UIView?) and desaturate (ios sdk desaturate image).
Then you can display other viewcontroller modally with transparent background to see-through your desaturated image (iOS: Modal ViewController with transparent background).

Image Positioning when resizing

I have an image that is 1000x134 referred to as logo
I have an UIImageView that contains that logo as AspectFit
I have another view in the back
The user is allowed to pan, pinch, and rotate the logo to position it where ever they want on top of the background view
After they have positioned the logo, I then increase the size of the background view
Problem: After the background view's size gets increased, the position of the logo gets messed up.
Question: How do I scale the logo with the background view in order for it to appear in the same position?
You should make the UIImageView a subview of your background view. That would make it easy to resize the whole view, perhaps using self.view.transform.

Push/Pop UIViewController Animation effect same as a camera filters and full camera view

I have have create 2 separate view controller for create functionality same as iPhone camera screen with all defaults filters.
Functionality working as per my requirements.
Now I have issue with view animation. How can I achieve same effect while user press on filter icon (left corner) in default camera and full camera screen after selecting any filter.
Look at below screen for more.
Thanks!
You can use a UIView for your filter options instead of UIViewController. Then you can animate whatever you want on the view.
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/#//apple_ref/doc/uid/TP40006816-CH3-SW108

Resizing the tabbar of camera in iphone5

I've problem to resize the tabbar in camera view.
Is it possible to decrease the height of the camera tabbar in iPhone5?
Are you talking about a camera view presented from a UIImagePickerController? Because if so, no. There is no direct way to customize the action bar of of the image picker beyond adding other views on top of it. You'd probably have to create a custom capture setup using some of the stuff in AVFoundation.

Resources