You could use local notification.
To illustrate:
bus 1 leaves at 8:00
bus 2 leaves at 8:30
bus 3 leaves at 9:00
It is 7:45
bus 1 shows at top of scrollView
you post a notification to trigger at 8:00 (when bus 1 has departed)
It is 8:00
the action of notification will scrollToItem 2 : the next bus in the timetable after 8:00
and post a new notification to fire at 8:30
It is 8:30
the action of notification will scrollToItem 3 : the next bus in the timetable after 8:30
etc…
See:
https://stackoverflow.com/questions/52009454/how-do-i-send-local-notifications-at-a-specific-time-in-swift
Topic:
Programming Languages
SubTopic:
Swift
Tags: