I have a view that acts like the macOS dock - it can be moved offscreen entirely.
My gesture recognizer looks like:
-(void)swipeDown:(UISwipeGestureRecognizer *)sender
{
NSLog(@"Swipe Down");
// this should move the dock 10 pixels below the bottom of the screen
[UIView animateWithDuration:0.5
delay:0.0
options:UIViewAnimationOptionCurveEaseOut
animations:^{[self dockView].frame = CGRectMake(kSafeMarginHorizontal, self.view.frame.size.height + 10, self.view.frame.size.width - (kSafeMarginHorizontal * 2), 80);}
completion:nil];
}
I am only using an autoresizing mask on my dockView with right and left edges pinned. In my main parent view I call:
[[self view] setTranslatesAutoresizingMaskIntoConstraints:YES];
This works fine, but after sliding offscreen, the corresponding Swipe Up gesture no longer works and if I swipe down again, I no longer get the NSLog indicating the method was called.
I can prevent this by not sliding the view entirely offscreen. If I leave a least a few pixels on the screen, it continues to work ok.
Why does this break my gesture recognizer?