0

I need your help. I have an Objective-C class called Timer with properties for a NSInteger (seconds for the timer), NSTimer and a BOOL (is timer running?). Also I have some methods, that control my timer (start/stop/reset).

In my ViewController I have 6 properties as a Timer-Object. That's because I need 6 different Timers for my app.

@property (strong, nonatomic) Timer *name1-6;

If I start my timer and make the time (property: seconds) visible in the console (NSLog) everything works. But it doesn't refresh my label on the storyboard.

Someone told me to use id and SEL as property, but I have no idea how to do that. Could you give me some hints where to use those properties? Or any other ideas?

If you need some code to understand me better, feel free to ask :)

Thanks for your help.

Steve Sahayadarlin
  • 1,164
  • 3
  • 15
  • 32

1 Answers1

0

The main problem is that the label is not going to be updated every second.

What do you need to do? Update your label.text every single second. How do you update a label every single second with the new content?

Stackoverflow already has the answer: How update a label periodically on iOS (every second)?

Community
  • 1
  • 1
iOSAddicted
  • 389
  • 1
  • 17