// // InstaBeanViewController.m // iBean // // Created by Eddie Ehlin on 2012-12-28. // Copyright (c) 2012 Eddie Ehlin. All rights reserved. // #import "InstaBeanViewController.h" @interface InstaBeanViewController () @end @implementation InstaBeanViewController /* - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // Custom initialization } return self; } */ - (void)viewDidLoad { [super viewDidLoad]; NSLog(@"InstaBean viewDidLoad"); // Do any additional setup after loading the view. } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } //Insta bean methods - (IBAction)setTimerInterval:(id)sender { NSString *timerSetting = [NSString stringWithFormat:@"%1.0f", [self.extractionSetupStepper value]]; NSLog(@"%@", timerSetting); [self.extractionTimerSettingLabel setText:timerSetting]; } - (IBAction)startExtraction:(id)sender { if (self.extractionInProgress == NO) { //Update button text to "Stop extraction" self.extractionInProgress = YES; [self.extractionButton setTitle:@"Stop extraction" forState:UIControlStateNormal]; [self.extractionButton setTintColor:[UIColor redColor]]; //TODO: Set red background image. //TODO: Start timer. } else { [self.extractionButton setTitle:@"Start extraction" forState:UIControlStateNormal]; self.extractionInProgress = NO; [self.extractionButton setTintColor:[UIColor greenColor]]; //TODO: Set green background image. //TODO: Halt timer } } @end