-(void)StartView{ //Life = [[NSUserDefaults standardUserDefaults] integerForKey:@"Life"]; (If in the code then it will not update the LifeCounter.text) livesUpdated = [NSTimer scheduledTimerWithTimeInterval:0.0001 target:self selector:@selector(LiveUpdatedCheck) userInfo:nil repeats:YES]; } -(void)LiveUpdatedCheck{ LifeCounter.text = [NSString stringWithFormat:@"%li", (long)Life]; } -(void)LiveUpdatedCheck{ LifeCounter.text = [NSString stringWithFormat:@"%li", (long)Life]; } -(IBAction)TenLifePurchase:(id)sender{ Life = Life + 10; }
-(IBAction)StartGame:(id)sender{ Life = [[NSUserDefaults standardUserDefaults] integerForKey:@"Life"]; LifeCounter.text = [NSString stringWithFormat:@"%li", (long)Life]; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)