If I wanted to create a simple class that has three instance variables and methods like
NSInteger seconds;
NSInteger minutes;
NSTimer *timer;
- (void)setMinutes:(NSInteger)m;
- (void)setSeconds:(NSInteger)s;
- (NSInteger)minutes;
- (NSInteger)seconds;
What I want is to initialize a NSTimer object and have it countdown with those minutes/seconds. But I'm not sure how to initialize the timer, and release it if I need to (in the event I had multiple timers going). I know how to use the method:
[NSTimer scheduledTimerWithTimeInterval:1.0
target:self
selector:@selector(doTimer:)
userInfo:nil
repeats:YES];
I don't see an example of NSTimer needing "alloc", or if it needs to be released as well.