快速触摸UIButton并不能完成所有触摸操作 给接收者。
有追索权吗?
iOS 12,以防万一。真实设备和模拟器
答案 0 :(得分:0)
我正在对处理程序中的触摸进行动画处理:
// https://stackoverflow.com/questions/46021640/how-to-sequence-two-animations-with-delay-in-between
let scaleForwardAnimationDuration: TimeInterval = 0.15
let transformBackAnimationDuration: TimeInterval = 0.1
let animationDuration: TimeInterval = scaleForwardAnimationDuration + transformBackAnimationDuration
UIView.animateKeyframes(withDuration: animationDuration, delay: 0, options: [], animations: {
UIView.addKeyframe(withRelativeStartTime: 0, relativeDuration: scaleForwardAnimationDuration) {
sender.transform = CGAffineTransform(scaleX: 0.75, y: 0.75)
}
UIView.addKeyframe(withRelativeStartTime: scaleForwardAnimationDuration, relativeDuration: transformBackAnimationDuration) {
sender.transform = .identity
}
})
导致输入下降 由于.allowUserInteraction 外部动画块的选项中缺少