📅  最后修改于: 2022-03-11 14:58:31.606000             🧑  作者: Mango
let sub = NotificationCenter.default
.publisher(for: NSControl.textDidChangeNotification, object: filterField)
.debounce(for: .milliseconds(500), scheduler: RunLoop.main)
.subscribe(on: RunLoop.main)
.assign(to:\MyViewModel.filterString, on: myViewModel)