ios – 与Focus相关的选择器控制方法

前端之家收集整理的这篇文章主要介绍了ios – 与Focus相关的选择器控制方法前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个带有UIPicker的iOS Watch应用程序,我不断收到与之相关的日志,我无法确定与Watch应用程序有关:

[default] -[SPRemoteInterface handlePlistDictionary:fromIdentifier:]:2977: ComF:->Plugin method .pickerFocus is not implemented by the controller (null)

[default] -[SPRemoteInterface handlePlistDictionary:fromIdentifier:]:2977: ComF:->Plugin method .pickerClearFocus is not implemented by the controller (null)

我检查了文档,最接近我找到的只是pickerDidFocus()方法,这似乎在谈论我正在使用的一般问题领域,但没有明确的实现方法,特别是.pickerClearFocus和.pickerFocus.

解决方法

我找到了一个解决方案(WKInterfaceButton).按钮参考插座和按钮发送的动作插座必须在同一个类中.当选择器插口引用视图并且操作引用视图控制器时,会显示该消息.

细胞 :

class aCellView: NSObject {
  var delegate: WKInterfaceController? = nil

  // The action outlet
  @IBAction func doSomeThing() {
    self.delegate!.doSomeThing()
  }
}

控制器:

class HomeInterfaceController: WKInterfaceController {
  // ... where you implement your cell
  cell.delegate = self
  // ... where you implement your cell
}
原文链接:https://www.f2er.com/iOS/329788.html

猜你在找的iOS相关文章