uzysjung / UzysImageCropper

An alternative to the UIImagePickerController editor with extended features.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Show black overlay same as UIImagePickerController & keep cropRect area clear as per attached screenshot

nfs3250 opened this issue · comments

First of all thanks for the library... It works as per requirement. Just want to know how can I show black overlay same as UIImagePickerController & keep cropRect area clear as per attached screenshot so that selected image portion is clearly visible

img_0133

I don't get it. can you be more specific?

Please have a look at attached screenshot using your code. If I use your code selected image portion is what you see behind the blue background. So what I want to say is instead of blue background, show it as clear color & at the same time show remaining portion of the view with black color with some transparency so that image behind that portion is still visible.
This will clearly tell user that which portion of the image you will get in result.

ios simulator screen shot nov 21 2014 12 39 54 pm

Hi, Currently. this libarary need to modify a little in order to support iPhont 6&6 Plus.

Anyway. please check Library / UzysImageCropper.m file

    //_cropperView show the view will crop.
    _cropperView = [[UIView alloc] initWithFrame:_cropRect];
    _cropperView.backgroundColor = [UIColor blueColor];
    _cropperView.alpha = 0.5;

    UIImageView *cropimg = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"cropperview.png"]] autorelease];
    cropimg.center = _cropperView.center;
    cropimg.alpha = 0.7;

modify _cropperView using masking

please check this site(http://perrymitchell.net/article/masking_uiview_cgrect/) , you can find uiview mask.

thanks.