I want to show my button when the user have zoomed enough in. I want to use the scrollViews zoomscale to determine this.
I do this
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
{
if (self.scrollView.zoomScale == 2.0)
{
[button setHidden:NO];
}
return imageView;
}
But I get bad access when I run my app o.O
Thanks
You mostlikely want to call this method instead:
Or even better use:
Put your if-statement in any of the methods but don’t use ‘==’ it’s rarely precisely 2.0
Use ‘<‘ instead.