Refactoring to v.2.0

This commit is contained in:
relikd
2018-12-27 21:11:59 +01:00
parent f9e672661a
commit 62c5bef463
50 changed files with 2574 additions and 3128 deletions

View File

@@ -1,31 +0,0 @@
class SomeViewController: NSViewController {
@IBOutlet weak var textField: NSTextField
private var NSTimer: fetchDataTimer?
private var currentText: String? {
didSet {
invalidateTimer()
if currentText.length > 3 {
restartTimer()
}
}
}
func textDidChange(notification: NSNotification) {
currentText = textField.stringValue
}
func invalidateTimer() {
if let timer = timer {
if timer.isValid {
timer.invalidate()
}
self.timer = nil
}
}
}