Photo rotate and crop image swift iOS - ios

I want when user tap on image option appears select from gallery or camera when user select on either gallery or camera after selection I want user can adjust photo through cropping or rotating so anyone help me how I can achieve this functionality.

Related

Show image or video on same tableview cell?

I want to get either image or video from photolibrary and display on same tableview Cell.
I already get image or video from photo library using imagepickercontroller, but don't know how to display on same cell(suppose user select photo then show photo on cell , if user select video , play video).
Note: I select photo from gallery, and don't want to save it.
Note: I don't want to use any 3rd party library.
After selecting the content identify if it is an image or video. Refer this link .
In the Cell add both imageView and videoPlayer. And hide one of them after selecting.

UIImagePickerController: How to allow editing but hide crop option

I want to pick an image from the gallery and show the preview for a user asking him/her to cancel/chose the image.
I can achieve this using the allowsEditing option but I want to hide the square crop that is displayed to the user, instead I just want to show the selected image in a separate view and give him an option to cancel or chose the selected image.
You cannot disable the 'crop' option if you are allowing the editing for the media but one thing that you do is to get the original image even if the user crops a selected image.
See below Apple mentioned in the documentation.
https://developer.apple.com/documentation/uikit/uiimagepickercontroller/infokey
Use the infoKey and get the originalImage instead of the cropped.

Preserve selection between UICollectionViewControllers

I'm developing an iOS app using Swift 2.0. Actually I'm facing a problem using UICollectionViewControllers to select multiple cells and preserve selection.
What I'm trying to do is to provide the user to select their images from Camera Roll, Facebook or Instagram. So far, I present the photo albums to the user in a PhotoAlbumsTableViewController and show the images in a PhotoCollectionViewController after the user select an album. Everything is working correctly until now.
Now, I want to preserve the selected photos on each album after the user returns to the AlbumsViewController to allow the user to select multiple photos on the Camera Roll then get back and select some others on the Instagram album and then click a Done button to show all the selected images. Any ideas?
Thanks in regards.

iOS Camera Preview Method on entry - Overlay Issue

how can I know when the camera preview is showed after the picture is taken? I want this because I'm using an overlay and when the app goes to the camera preview, the bottom bar gets smaller and so my overlay doesn't cover all the screen, all that I want is to resize this overlay when the camera preview is shown.
I solved using a translation for down on "camerapicker.transform" property, so now taken picture would be at the same position as while taking the photo, so the overlay would also would be in the same position.

Live zoomed view in an inset kind of box , when clicking pictures on camera view in iOS

I wan't to achieve the following thing:
--> When user tries to click picture through app ,i want to add another small rectangular view in which zoomed view is visible live while capturing image(which is seen by camera). Is it possible? I mean i have found that live streaming of camera is possible but that is in case of video.
I want to see zoomed view live when user moves camera.
Thanks in advance!

Resources