I have a parent UIView with 2 subviews: a UIButton and a UIScrollView with a UITapGestureRecognizer implemented. The UITapGestureRecognizer is used to zoom in and out the scrollview and the button is used to show/hide some text.
My problem is that once I've used the UIButton, the UITapGestureRecognizer is no longer functioning.
Also, the UITapGestureRecognizer is implemented from within the class for the scrollView, which is necessary to calculate the zoomScale correctly.
I've found a few similar questions, except they were having the opposite problem. Any ideas?
Thanks!
Edit: I just realized that after using the button, if I scroll around or pinch/zoom in the scrollView and then tap, it works again. It just doesn't work immediately after using the button.
Also, here's my code for how the button shows the text view:
- (void)textImageButtonAction:(id)sender{
if(self.textView.frame.origin.y < 0){
[UIView beginAnimations:@"HideTabbar" context:nil];
[UIView setAnimationDuration:.3];
textView.frame = CGRectMake(0.0, 0.0, self.view.frame.size.width, footerStringSize.height +10);
[UIView commitAnimations];
}
else if(self.textView.frame.origin.y == 0) {//If the textView is visible
[UIView beginAnimations:@"HideTabbar" context:nil];
[UIView setAnimationDuration:.3];
textView.frame = CGRectMake(0, -footerStringSize.height -10, self.view.frame.size.width, footerStringSize.height +10);
[UIView commitAnimations];
}
}