Why is forControlEvents UNDEFINED?
Posted
by munchine
on Stack Overflow
See other posts from Stack Overflow
or by munchine
Published on 2010-04-10T23:46:57Z
Indexed on
2010/04/10
23:53 UTC
Read the original article
Hit count: 327
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];
© Stack Overflow or respective owner