init(handle:nameComponents:image:rating:phoneNumber:)
Initializes and returns a ride driver object using a set of name components and other driver information
Declaration
convenience init(handle: String, nameComponents: PersonNameComponents, image: INImage?, rating: String?, phoneNumber: String?)Parameters
- handle:
A string containing information that your app uses to identify the driver. You might use an email address, phone number, account name, or any information that lets you identify the user uniquely.
- nameComponents:
The name of the driver, specified as a set of name components.
- image:
A picture of the driver.
- rating:
The driver’s rating. Strings should be short and informative. For example, you might specify the string “Good” or a string containing Unicode star (★, ☆) characters.
- phoneNumber:
The driver’s phone number. The user should be able to contact the driver at this number to coordinate ride details.
Return Value
An initialized driver object or nil if the object could not be created.
Discussion
You must specify all of the driver’s information at initialization time. You can’t change the values after initialization.