GKImagePicker icon indicating copy to clipboard operation
GKImagePicker copied to clipboard

First zoom than move problem (with fix)

Open SjoerdPerfors opened this issue 13 years ago • 2 comments

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);

SjoerdPerfors avatar Nov 09 '12 15:11 SjoerdPerfors

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);

keithyipkw avatar Nov 22 '12 11:11 keithyipkw

actually:

self.scrollView.contentSize = CGSizeMake(faktoredWidth, faktoredHeight);

is the right value.

fluxa avatar Jun 01 '13 16:06 fluxa