Skip to content

There is an issue while setting frame of BJImageCropper class. #9

@Rjmaurya13

Description

@Rjmaurya13

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.

img_0050

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions