Creating Custom Image Picker Controls- applying cropping - ios

I am designing a custom image picker, for that I am using view controllers, I have successfully used camera to take picture and proceed it to PreviewControllerVC, now I want to apply cropping on that screen.
any suggest.

I found the answer myself, HIPImageCropperView is the library i used for it.
It's best for this purpose.

Related

Create camera overlay to read OCR Code in swift

I am working an application which is using OCR code reading functionality, but i want to make a overlay on camera, like some portion of camera will read the code and other view on screen will show with blur effect.I am stuck here...please help...thanks..
Create a CustomOverlay View and use it.
I did similar kind of demo app.
Please check here:https://github.com/RaviiOS/BarCodeScanDemo/tree/master/BarCodeScanDemo

UIImagePickerController with Custom Overlay and Edit Image

I am taking picture using UIImagePickerController with custom overlay view. I have a requirement to enable native editing mode of UIImagePickerController when photo is taken and user taps "Edit" button which is on my custom overlay view.
I have set:
imagePickerController.showsCameraControls = NO;
How is this possible to achieve?
Thanks,
You might be trying using UIImagePickerController. But I know this one solution to your problem. You can do it easily using AVCamCaptureManager and AVCamRecorder classes. Apple has a demo program build on its developer site here. It is named AVCam. In simple words what it does is when you click to open the camera, it calls the classes and methods which are responsible for opening the iPhone's camera and record video or capture audio. It calls the same classes which are called by UIImagePickerController. So your camera will open and start taking input.
Now, if you open the xib file of that AVCam project, you'll find a small UIView object. This view is responsible for displaying the camera's feed. You can resize that view as per the size you want and the camera's input will be displayed in that much area. You can also put the frame image around it as per your choice.
It worked for me when I wanted to resize the camera's input feed and capture photos. I hope it works for you as well.

iOS How to create a custom image picker/browser

I have been looking around and haven't found a good answer for this.
Instagram uses an image browser/picker like . As you can see above the images from the photo gallery are displayed in a grid below and you can directly choose image from there instead of using the default image picker layout.
The Groupme app also does something similar..
Where images are displayed in a horizontal scrollable list and you can just choose from this.
I have been reading up on the image picker and the documentation says that subclassing is not support.
So my question is:
How do you create something like this?
If this is just a custom view that loads the images stored on the device. How do I access those images?
I just need a starting point and what to specifically look for (custom browser/image picker etc).
Thanks in advance.
You use the ALAssetsLibrary APIs, docs here.

Creating my own Image Picker

I'd like to create a custom image browser in my app that uses the images from the camera roll.
i.e. I'd like to completely replace UIImagePickerController and use my own control.
Is there a way of accessing the camera roll photos in this way?
Cluster App does this but I can't find a picture of it.
You need to use ALAssetsLibrary to access the images.
Have a look at the QBImagePickerController on the GitHub. They implemented custom image picker controller very similar to UIImagePickerController with added multiple selection feature. It will help you. Atleast look at this file
Check out RengarViewController
a custom image picker controller which make use of Photo Framework (introduced in iOS 8).
It has nice UI, can be scrolled and panned.

CameraRoll Button using UIImagePickerControllerSourceTypeCamera?

I want my camera ui will have the regular Camera Roll button. The one that you have when you open the camera app. Is there a simple way doing that or I'll have to use a custom layer? Tried searching in the documentation without success.
There is not an easy way to do it. You should implement your own custom toolbar to replicate the camera app behavior. You should use the overlay view property of the imagePicker. Have a look at this link for a possible implementation

Resources