Search code examples
swiftwatchkitapple-watch

How do you add a pulldown to refresh feature on a Apple Watch using Swift


Is it possible on a WKInterfaceController to know when a WKInterfaceTable has been pulled down so I can refresh the contents of the table? I know this is possible on many iphone apps and im looking for a similar feature.

If so, could you please provide some example code?


Solution

  • This is not possible in the WatchKit SDK. There is no access to anything similar to the UIRefreshControl from iOS for third party developers, and additionally nothing equivalent to UIGestureRecognisers nor API functions associated with taps or swiping for third party developers.

    With regards to taps, it is possible to respond to events on button presses, through an IBAction, it's just that we can't interrogate the taps in terms of things like tap location...