我在
Xcode中收到此错误.
2018-02-26 07:13:22.326888-0500 Watch Extension[1298:2691330] [View]
First responder warning: '<SPInterfacePicker: 0x14dc1740; frame = (76
0; 58 44); gestureRecognizers = <NSArray: 0x14dcd8a0>; layer =
<CALayer: 0x14dc1910>>' rejected resignFirstResponder when being
removed from hierarchy
我的InterfaceController有4个WkInterfacePickers,看起来这个错误可能与呈现警报有关(当用户保存数据时),但我不确定.
有没有人见过这个?
我的代码:
if successSaving == true { dispatchQueue.main.async { WKInterfaceDevice.current().play(.success) self.showSuccessAlertWith(message: "Workout Saved,Stats Added.") } func showSuccessAlertWith(message: String){ let action1 = WKAlertAction(title: "OK",style: .default) { WKInterfaceController.reloadRootPageControllers(withNames: ["InterfaceController"],contexts: nil,orientation: .vertical,pageIndex: 0) } presentAlert(withTitle: "Success",message: message,preferredStyle: .alert,actions: [action1]) } }