Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Swift 立即从更新中删除_Swift_Cocoa_Binding - Fatal编程技术网

Swift 立即从更新中删除

Swift 立即从更新中删除,swift,cocoa,binding,Swift,Cocoa,Binding,我想将输入从文本字段同步到滑块 我尝试使用连接检查器中的takeIntegerValueFrom:链接它们。 是否有办法立即更新该值?看起来,默认情况下,当焦点丢失时,该值会更改 附言。 我也尝试过使用Bond库,但下面的代码行也不起作用 textView.reactive.integerValue.bind(到:slider.reactive.integerValue)根据可以子类化的文本字段的输入更新滑块 NSTextField和overwrite键控 override func key

我想将输入从文本字段同步到滑块

我尝试使用
连接检查器中的
takeIntegerValueFrom:
链接它们。 是否有办法立即更新该值?看起来,默认情况下,当焦点丢失时,该值会更改

附言。 我也尝试过使用Bond库,但下面的代码行也不起作用
textView.reactive.integerValue.bind(到:slider.reactive.integerValue)
根据可以子类化的文本字段的输入更新滑块 NSTextField和overwrite键控

  override func keyUp(with event: NSEvent) {
        print("Send to slider \(self.intValue)")
  }

如果是关于基于滑块更新文本字段,则在控制设置中仅为滑块启用“连续”。这可以在Interface builder中完成。

使用notification observer立即更新值如何?当用户键入125时,滑块应转到1、12和125?