我正在使用UIFeedback Haptic Engine
with swift 2.3,例如:
let generator = UINotificationFeedbackGenerator()
generator.notificationOccurred(.Warning)
和
let generator = UIImpactFeedbackGenerator(style: .Heavy)
generator.impactOccurred()
今天我遇到了这样的新错误,找不到问题。你有什么主意吗?
UIFeedbackHapticEngine _deactivate] called more times than the feedback engine was activated
细节:
Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 0x1863e41c0 __exceptionPreprocess
1 libobjc.A.dylib 0x184e1c55c objc_exception_throw
2 CoreFoundation 0x1863e4094 +[NSException raise:format:]
3 Foundation 0x186e6e82c -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
4 UIKit 0x18cc43fb8 -[_UIFeedbackEngine _deactivate]
5 UIKit 0x18cad781c -[UIFeedbackGenerator __deactivateWithStyle:]