Hey,
I'm kind of new to programming in general and Objective-C, Cocoa, Xcode, and pretty much everything in general, but personally I hate the tunary operator. I would ditch it as it has caused me issues in other API's I've used.
Other than that, I would put a NSLog in your function call.
Code:
- (IBAction)start:(id)sender
{
NSLog(@"Entering: (IBAction)start:(id)sender");
UIBarButtonItem *button = (UIBarButtonItem *)sender;
NSString *title = (timer!=nil) ? @"Start" : @"Stop";
if (timer!=nil)
{
NSLog(@"(timer != nil) == TRUE))";
[timer invalidate];
[timer release];
timer = nil;
}
else
{
NSLog(@"(timer != nil) == FALSE))";
timer = [NSTimer scheduledTimerWithTimeInterval:0.025 target:self selector:@selector(tick) userInfo:nil repeats:YES];
}
[button setTitle:title];
NSLog(@"Exiting: (IBAction)start:(id)sender");
}
Hope this will help a little. I figure any suggestions is better than none.