Why is forControlEvents UNDEFINED?
- by munchine
Hi Guys,
I've got a simple question but it has got me confounded. The code below gets a UNDEFINED error for UIControlTouchUpInside. What do I need to include or import? If I comment out the line, it works. So that means forState:UIControlStateNormal is defined. I'm new so hope you can help.
UIButton * button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[button setTitle:@"Accept?" forState:UIControlStateNormal];
[button addTarget:self action:@selector(acceptTapped) forControlEvents:UIControlTouchUpInside];
button.frame = CGRectMake(225.0, 145.0, 80.0, 30.0);
[self.view addSubview:button];