J'ai une question simple mais elle m'a confondu. Le code ci-dessous obtient une erreur UNDEFINED pour UIControlTouchUpInside. De quoi ai-je besoin pour inclure ou importer? Si je commente la ligne, cela fonctionne. Cela signifie que forState: UIControlStateNormal est défini. Je suis nouveau alors j'espère que vous pouvez aider.Pourquoi UIControlTouchUpInside est-il UNDEFINED?
UIButton * button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[button setTitle:@"Accept?" forState:UIControlStateNormal];
[button addTarget:self action:@selector(acceptTapped) forControlEvents:UIControlTouchUpInside];