0

出于某种原因,我的 UIButton 需要点击两次才能触发,我不明白为什么,这不是所需的功能,我的所有其他按钮都按预期工作

这是addTarget代码:

[self.myButton addTarget:self action:@selector(publishButtonTapped) forControlEvents:UIControlEventTouchUpInside];

我的功能publishButtonTapped直到第二次快速连续点击才会触发。

我必须忽略其他一些东西,所以任何见解都值得赞赏

我的按钮和布局是以编程方式创建的,因此没有 XIB 或情节提要。

4

0 回答 0