Is there a way to use the overlays in the UIImagePickerController
to show the square picture a user might use, while having a toggle button in there somewhere to switch on the fly?
Currently the iOS 7 camera has this capability, but UIImagePickerController
does not (thanks Apple), so is there a way to add this functionality?
Would using AVCaptureSession
be necessary? It seems like serious overkill, and I'd have to program flash/focus/etc all over again, I think.
Failing that, is there a customizable class that already exists that I could just implement?
I'm banging my head against the wall trying to figure out the best course of action here, so any help would be appreciated.
Either swipe up anywhere on the screen or tap the chevron (arrow) icon at the top of the screen. This brings up all the extra options at the bottom of the viewfinder. Tap “4:3” (that's the iPhone camera's default crop). Tap “Square” to switch from 4:3 mode to Square mode.
Square. Square mode limits the frame of your camera screen to a square — the optimal photo size for many social media apps. So when you take a photo, you can quickly share it on your favorite social platforms.
You can adjust the camera view by transforming the scale
CGAffineTransform transform = CGAffineTransformMakeScale(1.0, 0.5);
imagePickerController.cameraViewTransform = transform;
with the arguments being the scale to change the x
and y
axis of the camera screen by. You could add a button that re-presents the camera view within the view controller at the top of your hierarchy. It may not perfectly recapitulate the native phone app, but it will be a pretty good approximation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With