|
|
@@ -1,17 +1,17 @@ |
|
|
|
import Foundation |
|
|
|
|
|
|
|
class TextFieldValueOwner: Formatter { |
|
|
|
override func string(for obj: Any?) -> String? { |
|
|
|
guard let str = obj as? String else { return nil } |
|
|
|
return String(str.dropFirst(2)) |
|
|
|
} |
|
|
|
override func string(for obj: Any?) -> String? { |
|
|
|
guard let str = obj as? String else { return nil } |
|
|
|
return String(str.dropFirst(2)) |
|
|
|
} |
|
|
|
|
|
|
|
override func getObjectValue( |
|
|
|
_ obj: AutoreleasingUnsafeMutablePointer<AnyObject?>?, |
|
|
|
for string: String, |
|
|
|
errorDescription error: AutoreleasingUnsafeMutablePointer<NSString?>? |
|
|
|
) -> Bool { |
|
|
|
obj?.pointee = "u:\(string)" as AnyObject |
|
|
|
return true |
|
|
|
} |
|
|
|
override func getObjectValue( |
|
|
|
_ obj: AutoreleasingUnsafeMutablePointer<AnyObject?>?, |
|
|
|
for string: String, |
|
|
|
errorDescription error: AutoreleasingUnsafeMutablePointer<NSString?>? |
|
|
|
) -> Bool { |
|
|
|
obj?.pointee = "u:\(string)" as AnyObject |
|
|
|
return true |
|
|
|
} |
|
|
|
} |