Returns by reference a person name components object after creating it from a given string.
SDKs
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
func getObjectValue(_ obj: Autoreleasing Unsafe Mutable Pointer<AnyObject?>?, for string: String, errorDescription error: Autoreleasing Unsafe Mutable Pointer<NSString?>?) -> Bool
Parameters
obj
On return, contains an instance of
NSPerson
, orName Components nil
if conversion failed.string
A string that is parsed to create a person name components object.
error
If an error occurs, upon return contains an
NSError
object in theNSCocoa
with codeError Domain NSFormatting
that explains why the conversion failed. If you pass inError nil
for error, you are indicating that you are not interested in error information.
Return Value
true
if conversion succeeded; otherwise false
.