I'm looking for how to detect gestures in an Apple Watch app, via the WatchKit SDK. In iOS we can use some code like this:
- (void)viewDidLoad
{
...
UISwipeGestureRecognizer *swipeRightBlack = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(slideToRightWithGestureRecognizer:)];
swipeRightBlack.direction = UISwipeGestureRecognizerDirectionRight;
[self.viewBlack addGestureRecognizer:swipeRightBlack];
}
...but this doesn't work in the Apple Watch simulator. Is there a way to override the default gesture actions using WatchKit, or just recognize them when the OS receives them?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…