0
我有一個簡單的問題,但它讓我感到困惑。下面的代碼爲UIControlTouchUpInside獲取了一個UNDEFINED錯誤。我需要包含或導入什麼?如果我註釋掉這一行,它就會起作用。這意味着forState:UIControlStateNormal被定義。我是新人,所以希望你能幫助。爲什麼UIControlTouchUpInside UNDEFINED?
UIButton * button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[button setTitle:@"Accept?" forState:UIControlStateNormal];
[button addTarget:self action:@selector(acceptTapped) forControlEvents:UIControlTouchUpInside];