I can't understand why the selector is not called.
//EDITED
[self.scrollView setContentSize:CGSizeMake(320, 600)];
UIButton *btn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btn addTarget:self
action:@selector(validateTextFields:)
forControlEvents:UIControlEventTouchUpInside];
[btn setTitle:@"Продължи" forState:UIControlStateNormal];
btn.frame = CGRectMake(55, 580, 210, 50);
[self.scrollView addSubview:btn];
-(IBAction)validateTextFields:sender
{
NSLog(@"Called");
}
When I touch the button "Called" is not logged in console. If I change UIControlEventTouchUpInside to UIControlEventTouchDown validateTextFields method is executed.