I am trying to listen to changes in my UITableViewCell
-instance and I would like to use observeValue
for this so I would like to override this method. I have tried the following in my cell class:
open override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
let obj = object as AnyObject?
Loggly.log("TextFieldCell.observeValue() UIContentSizeCategoryDidChangeNotification-triggered")
}
Only when I try this then I am getting the following compiler errors:
Reference: /Users/x/Development/Compilers/10.0.0.2398/Toffee SDKs/iOS 12.2 Simulator/CloudKit.fx
Reference: /Users/x/Development/Compilers/10.0.0.2398/Toffee SDKs/iOS 12.2 Simulator/QuartzCore.fx
E: Unknown type "UnsafeMutableRawPointer" [/Users/x/Development/Projects/x/x/version-3/config-app/x/Views/TextFieldCell.swift (77)]
<- Phase Resolving Bodies finished, took 1.6716s.
-> Phase Checking Members started.
E: Cannot find a suitable method in the base class to override with signature "func observeValue(forKeyPath keyPath: String?, of object: Any?, # change: Swift.Dictionary<NSKeyValueChangeKey,Any>?, # context: Error)" [/Users/x/Development/Projects/x/x/version-3/config-app/x/Views/TextFieldCell.swift (77)]
N: Possible match: func observeValue(forKeyPath NSString?, of id?, # NSDictionary<NSString!,id!>!, # UnsafePointer<Void>) [/Users/x/Development/Projects/x/x/version-3/config-app/x/Views/TextFieldCell.swift (77)]
<- Phase Checking Members finished, took 0.1065s.
-> Phase Generating Helper Types started.
How can I find the right way to override this function in Silver/Swift?