Created
November 16, 2021 12:54
-
-
Save krzyzanowskim/9ddff1373f6bee6875cfd614c0b99f1e to your computer and use it in GitHub Desktop.
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
class TextFormatter: Formatter { | |
override func string(for obj: Any?) -> String? { | |
obj as? String | |
} | |
override func getObjectValue(_ obj: AutoreleasingUnsafeMutablePointer<AnyObject?>?, for string: String, errorDescription error: AutoreleasingUnsafeMutablePointer<NSString?>?) -> Bool { | |
obj?.pointee = string as AnyObject | |
return true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment