Running Timer on different ViewController

I am new to Swift and my task is to run a Timer instance on 5 different ViewController, which are each embedded in a TabBarController and a NagivationBarController.

To ensure that every Viewcontroller gets the same "time" displayed (for test purposes 1 second), I created a Timer Class named "TimeIsTicking" and my plan is

  • Create a Label on each ViewController
  • Each Label Text is written by an instance of "TimeIsTicking" so that when I switch between the ViewController on every single one of them the same value is displayed

Like you can see in the print statements, everything is "up and running" but the Label Text is not being updated. I am out of suggestions and help will be much appreciated.

Hint: "%.0f" is not a valid format string for an Int value.

Tip 1: When sharing code, please paste it in as text and apply the Code Block formatting style, rather than a screenshot.

Tip 2: Consider using a NumberFormatter (if you need any fancy formatting) rather than the more error-prone String(format:_:).

Running Timer on different ViewController
 
 
Q