This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://stackoverflow.com/a/41438789/484605 | |
class ControlClosure { | |
let closure: ()->() | |
init (_ closure: @escaping ()->()) { | |
self.closure = closure | |
} | |
@objc func invoke () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
public class SearchBar: UISearchBar, UISearchBarDelegate { | |
/// Throttle engine | |
private var throttler: Throttler? = nil | |
/// Throttling interval | |
public var throttlingInterval: Double? = 0 { | |
didSet { |