GKImagePicker
GKImagePicker copied to clipboard
First zoom than move problem (with fix)
When loading the zoom and scale view you will have to zoom first before you can move the image.
This can be fixed if we set the contentsize of the scrollview larger than de cropsize.
GKImageCropView.m
- (void)layoutSubviews
change: self.scrollView.contentSize = CGSizeMake(size.width, size.height); in: self.scrollView.contentSize = CGSizeMake(width, height);
The following line will produce more desirable result.
self.scrollView.frame = CGRectMake(xOffset, yOffset, size.width, size.height);
[self.scrollView layoutIfNeeded];
self.imageView.frame = CGRectMake(0, floor((size.height - faktoredHeight) * 0.5), faktoredWidth, faktoredHeight);
actually:
self.scrollView.contentSize = CGSizeMake(faktoredWidth, faktoredHeight);
is the right value.