更新时间:2023-01-25 18:49:19
拿出self.nextButton.alpha = 0
来测试一下,相信alpha为零时按钮事件不会触发.当涉及到动画时,实际对象的 alpha 将在动画开始之前设置为零,您所看到的就像动画时视图的渲染交互式屏幕截图
Take out self.nextButton.alpha = 0
to test this out, I believe that button events will not fire when alpha is zero. When it comes to animations, the actual object's alpha will get set to zero before the animation starts, and what you are seeing is like a rendered interactive screenshot of your view as it animates
如果是这种情况,那么您需要将 alpha 设置为 0.0100000003 或覆盖按钮以在 alpha 0 处进行交互
If that is the case, then you need to set the alpha to something like 0.0100000003 or override the button to be interactive at alpha 0