read
Encountered the same bug when creating a UIScreenEdgePanGestureRecognizer
via Interface Builder.
It just didn’t work as expected: the selector is never called.
Other gesture recognizers work. Except panning from edge.
We can only fallback to manually creating it
- (void)viewDidLoad {
[super viewDidLoad];
UIScreenEdgePanGestureRecognizer *leftEdgeGesture = [[UIScreenEdgePanGestureRecognizer alloc] initWithTarget:self action:@selector(handleLeftEdgeGesture:)];
leftEdgeGesture.edges = UIRectEdgeLeft;
leftEdgeGesture.delegate = self;
[self.view addGestureRecognizer:leftEdgeGesture];
}
- (IBAction)handleLeftEdgeGesture:(UIScreenEdgePanGestureRecognizer *)gesture {
NSLog(@"panned");
}
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
return YES;
}
Not impressed with a bug that is not fixed for over 6 months.