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, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access