How to debug iPhone aplication? How can i find out what's going on in simulator? i'm beginner in xcode development and don't know what's problem with code below.. the app is just crashing on button click..
- (void)viewDidLoad {
myLabel = [[UILabel alloc]init];
[myLabel setText:@"Labela"];
myLabel.frame = CGRectMake(50.0,50.0, 100.0, 30.0);
[self.view addSubview:myLabel];
myButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[myButton addTarget:self
action:@selector(buttonAction:)
forControlEvents:UIControlEventTouchDown];
[myButton setTitle:@"Klikni" forState:UIControlStateNormal];
[myButton setFrame:CGRectMake(80.0, 210.0, 160.0, 40.0)];
[self.view addSubview:myButton];
[super viewDidLoad];
}
- (void)buttonAction{
[myLabel setText:@"Promijenjen!"];
}