Making Your Complication Excellent with Time Travel
To support Time Travel, you need to modify your ComplicationController in NomNomNom to support it. Just as you need to provide the current complication before the user raises her wrist, so that the data can be there immediately, you need to provide the past and future complications before the user activates Time Travel, so she can smoothly transition from present to past and future. It all begins with getSupportedTimeTravelDirectionsForComplication(_:withHandler:). This method determines whether your complication can support going forward or backward in time (or both). For NomNomNom, since you’re looking at calendar data, you can support both. Other apps may be a judgment call: for instance, ...
Get Developing for Apple Watch, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.