// // abcViewController.m // SingleView // // Created by UEC on 4/1/16. // Copyright (c) 2016¦~ uec. All rights reserved. // #import "abcViewController.h" @interface abcViewController () @end @implementation abcViewController @synthesize myLabel,myButton; int i=100; - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. NSLog(@"Apps started !!"); } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. NSLog(@"Memory warning !!"); } - (IBAction)onClick:(id)sender { for (int y=0; y<10; y++) { i = i + y; } NSString *myresult = [[NSString alloc]initWithFormat:@"The result is %i",i]; NSLog(@"I am clicked !!"); myLabel.text = myresult; } - (IBAction)onClick2:(id)sender { myLabel.text = @"Second Button Clicked !!"; } @end