Reputation: 2991
Is there any way to know when the cancel/dismiss button is tapped on the Apple Watch?
- (void)didDeactivate
Is not an option because that is called whenever the watch goes dark. I'm trying to sync data with the parent iPhone app and this makes it tough to cancel an operation on the parent app.
Upvotes: 4
Views: 772
Reputation: 369
While you can't get the cancel directly, you can tell which view controller is active (because your code displayed it) and then tell when they switch. So you can set some flags on display and on de-activate, to tell when the view controller with the cancel button goes away.
Think of it another way, if your view controller disappears and another one displays, the activate of the other controller tells you the watch did not sleep.
Upvotes: 3
Reputation: 3347
Unfortunately, the current version of WatchKit has no method to determine if the Cancel
button is tapped. The closest you'll get is the didDeactivate
event that you've already mentioned.
Upvotes: 0