One Logo Pool Ball
Foundation · IOS API REFERENCE

Formatter

class · SDK 27.1

class Formatter

Members (6)

method

attributedString

TypeScript
attributedString(obj: unknown, attrs?: (NativeMap<NSAttributedString_Key, unknown>) | null): (NSAttributedString) | null
Swift declaration
func attributedString(for obj: Any, withDefaultAttributes attrs: [NSAttributedString.Key : Any]? = nil) -> NSAttributedString?
method

editingString

TypeScript
editingString(obj: unknown): (string) | null
Swift declaration
func editingString(for obj: Any) -> String?
method

getObjectValue

TypeScript
getObjectValue(string: string): { $ret: boolean; $out: { "obj": (unknown) | null; "error": (NSString) | null } }
Swift declaration
func getObjectValue(_ obj: AutoreleasingUnsafeMutablePointer<AnyObject?>?, for string: String, errorDescription error: AutoreleasingUnsafeMutablePointer<NSString?>?) -> Bool

Omit the output parameters from the call. The result contains $ret and $out, with obj, error inside $out.

init

init

TypeScript
static init(): Formatter
Swift declaration
init()
method

isPartialStringValid

TypeScript
isPartialStringValid(partialString: string): { $ret: boolean; $out: { "newString": (NSString) | null; "error": (NSString) | null } }
Swift declaration
func isPartialStringValid(_ partialString: String, newEditingString newString: AutoreleasingUnsafeMutablePointer<NSString?>?, errorDescription error: AutoreleasingUnsafeMutablePointer<NSString?>?) -> Bool

Omit the output parameters from the call. The result contains $ret and $out, with newString, error inside $out.

method

string

TypeScript
string(obj?: (unknown) | null): (string) | null
Swift declaration
func string(for obj: Any?) -> String?

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

Formatter.isPartialStringValid(_:proposedSelectedRange:originalString:originalSelectedRange:errorDescription:)

The iOS SDK compiler rejected this binding: cannot convert value of type 'Bool' to specified type 'NSString'

All Foundation types →