Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 03-10-2009, 05:52 PM   #2 (permalink)
Legrend
New Member
 
Join Date: Mar 2009
Location: Covina, California - United States
Age: 26
Posts: 22
Default

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.
Legrend is offline   Reply With Quote
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,314
Threads: 39,112
Posts: 171,494
Top Poster: smasher (2,576)
Welcome to our newest member, biggybillly
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:12 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.