BJImageCropper
BJImageCropper copied to clipboard
There is an issue while setting frame of BJImageCropper class.
I am using this code.
self.imageCropper = [[BJImageCropper alloc] initWithFrame:self.myView.frame];
self.imageCropper.image = self.imageToCrop;
self.imageCropper.clipsToBounds = YES;
[self.myview addSubview:self.imageCropper];
self.imageCropper.center = self.view.center;
self.imageCropper.imageView.layer.shadowColor = [[UIColor blackColor] CGColor];
self.imageCropper.imageView.layer.shadowRadius = 3.0f;
self.imageCropper.imageView.layer.shadowOpacity = 0.8f;
self.imageCropper.imageView.layer.shadowOffset = CGSizeMake(1, 1);
and i also change code of BJImageCropper
- (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { imageScale = 1.0;
// imageView = [[UIImageView alloc] initWithFrame:CGRectInset(self.bounds, MAGE_CROPPER_OUTSIDE_STILL_TOUCHABLE, IMAGE_CROPPER_OUTSIDE_STILL_TOUCHABLE)];
imageView = [[UIImageView alloc] initWithFrame:self.frame];
[self addSubview:imageView];
[self setup];
}
return self;
}
There is also padding from y direction to the my view.