RiValT_TimerEditor_PageViewContainer
@MainActor
class RiValT_TimerEditor_PageViewContainer : RiValT_Base_ViewController
extension RiValT_TimerEditor_PageViewContainer: UIPageViewControllerDataSource
extension RiValT_TimerEditor_PageViewContainer: UIPageViewControllerDelegate
This class acts as a “wrapper” for an instance of the RiValT_TimerEditor_PageViewController
class. It also provides a Navigation Item, as well as a toolbar, for selecting amongst multiple timers in a group.
If there is only one timer in the group, then the toolbar is not displayed.
If there are more than one timers, the toolbar has numbered squares, representing each timer. Selecting a numbered square, brings that timer into the editor.
This also presents a “Delete” (trashcan) icon in the upper right corner (Navigation Bar). That acts in exactly the same manner as the “Delete” button in the Group Editor Screen. Selecting it, brings up a confirmation alert, and choosing to delete, will dismiss the screen.
-
The page view controller that manages the group of timer screens.
Declaration
Swift
@MainActor weak var pageViewController: RiValT_TimerEditor_PageViewController?
-
If there is a string here, it is used as the title of the screen, instead of the format.
Declaration
Swift
@MainActor var optionalTitle: String?
-
This is set to true, if we want to override the pref.
Declaration
Swift
@MainActor var forceStart: Bool
-
The container view for the page view controller.
Declaration
Swift
@IBOutlet @MainActor weak var pageViewContainer: UIView?
-
The toolbar at the bottom. This acts like a page control.
Declaration
Swift
@IBOutlet @MainActor weak var toolbar: UIToolbar?
-
The delete button, in the navbar.
Declaration
Swift
@IBOutlet @MainActor weak var deleteBarButton: UIBarButtonItem?
-
The currently selected timer editor view controller.
Declaration
Swift
@MainActor var currentlySelectedTimerEditor: RiValT_EditTimer_ViewController? { get }
-
The group for the current timer.
Declaration
Swift
@MainActor var timer: Timer? { get }
-
The group for the current timer.
Declaration
Swift
@MainActor var group: TimerGroup? { get }
-
Called when the view has loaded.
Declaration
Swift
@MainActor override func viewDidLoad()
-
Called when the view is about to appear
Declaration
Swift
@MainActor override func viewWillAppear(_ inIsAnimated: Bool)
Parameters
inIsAnimated
True, if the appearance is animated.
-
Called when we are to segue to another view controller.
Declaration
Swift
@MainActor override func prepare(for inSegue: UIStoryboardSegue, sender inData: Any?)
Parameters
inSegue
The segue instance.
inData
An opaque parameter with any associated data.
-
This sets up the bottom toolbar.
Declaration
Swift
@MainActor func setUpToolbar()
-
Called when the Watch wants us to play.
Declaration
Swift
@MainActor func remotePlay()
-
The delete button in the navbar was hit.
See moreDeclaration
Swift
@IBAction @MainActor func deleteButtonHit(_ inButton: UIBarButtonItem)
-
Called when one of the numbered timer squares in the toolbar is hit.
Declaration
Swift
@objc @MainActor func toolbarTimerHit(_ inButton: UIBarButtonItem)
Parameters
inButton
The timer button.
-
Called to provide a new view controller, when swiping.
Declaration
Swift
@MainActor func pageViewController(_: UIPageViewController, viewControllerBefore inNextViewController: UIViewController) -> UIViewController?
Parameters
viewControllerBefore
The view controller for the timer that will be AFTER ours
-
Called to provide a new view controller, when swiping.
Declaration
Swift
@MainActor func pageViewController(_: UIPageViewController, viewControllerAfter inPrevViewController: UIViewController) -> UIViewController?
Parameters
viewControllerAfter
The view controller for the timer that will be BEFORE ours
-
Called when a swipe has completed.
Declaration
Swift
@MainActor func pageViewController(_: UIPageViewController, didFinishAnimating: Bool, previousViewControllers: [UIViewController], transitionCompleted inCompleted: Bool)
Parameters
didFinishAnimating
True, if the animation completed (ignored).
previousViewControllers
The previous view controllers (ignored).
transitionCompleted
True, if the transition completed (ignored).