ChangeHandler
public class ChangeHandler
Works in conjunction with will-change and did-change notifications that are delivered to a UI control when an associated Property’s underlying value is changing asynchronously.
-
Undocumented
Declaration
Swift
public init() -
Undocumented
Declaration
Swift
public init(onLock: @escaping () -> Void, onUnlock: @escaping () -> Void) -
Resets the change count to zero and calls
onUnlockif the change count was previously non-zero. Must be called on UI thread.Declaration
Swift
public func resetCount() -
Increments the change count by the given amount. If the change count goes from 0 to >= 1,
onLockwill be invoked. Must be called on UI thread.Declaration
Swift
public func incrementCount(_ inc: Int) -
Decrements the change count by the given amount. If the change count goes to 0,
onUnlockwill be invoked. Must be called on UI thread.Declaration
Swift
public func decrementCount(_ dec: Int) -
Notes that a change is coming. If the change count goes to 1,
onLockwill be invoked. Must be called on UI thread.Declaration
Swift
public func willChange() -
Notes that a change has occurred. If the change count goes to 0,
onUnlockwill be invoked. Must be called on UI thread.Declaration
Swift
public func didChange()
ChangeHandler Class Reference