ABUnknownPersonViewController Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/AddressBookUI.framework
Availability
Available in iOS 2.0 and later.
Declared in
ABUnknownPersonViewController.h
Related sample code

Overview

The ABUnknownPersonViewController class (whose instances are known as unknown-person view controllers) implements a view controller used to create a person record from a set of person properties.

Unknown-person view controllers display contact information that can be saved to the Address Book database. From instances of this class, users may also initiate standard actions, such as:

Performing any of the standard actions may result in your application being moved to the background.

Subclassing Notes

The ABUnknownPersonViewController class does not support subclassing.

Tasks

Displaying Person Properties

Managing Delegates

Properties

addressBook

Optional. The address book database that the person record is added to.

@property(nonatomic, readwrite) ABAddressBookRef addressBook
Discussion

When unspecified, this view controller sets the value of this property by creating an ABAddressBookRef object.

The person record is only added to the address book database if allowsAddingToAddressBook is YES and the user taps the “Add to Existing Contact” or “Create New Contact” button.

Availability
  • Available in iOS 2.0 and later.
Declared In
ABUnknownPersonViewController.h

allowsActions

Specifies whether buttons appear to let the user perform actions such as sharing the contact, initiating a FaceTime call, or sending a text message.

@property(nonatomic) BOOL allowsActions
Discussion

The default value is NO.

Availability
  • Available in iOS 2.0 and later.
Related Sample Code
Declared In
ABUnknownPersonViewController.h

allowsAddingToAddressBook

Specifies whether the user can add the properties displayed by the unknown-person view controller to the address book database, either as a new contact or by adding them to an existing contact.

@property(nonatomic) BOOL allowsAddingToAddressBook
Discussion

The default value is NO.

Availability
  • Available in iOS 2.0 and later.
Related Sample Code
Declared In
ABUnknownPersonViewController.h

alternateName

Provides a value that is displayed instead of the first and last name.

@property(nonatomic, copy) NSString *alternateName
Discussion

The alternate name is only for display. It is not saved if this contact is added to the address book database.

Availability
  • Available in iOS 2.0 and later.
Related Sample Code
Declared In
ABUnknownPersonViewController.h

displayedPerson

Specifies a person record whose properties are displayed by the view controller.

@property(nonatomic, readwrite) ABRecordRef displayedPerson
Discussion

All the properties of displayedPerson are displayed by the view controller.

Availability
  • Available in iOS 2.0 and later.
Related Sample Code
Declared In
ABUnknownPersonViewController.h

message

Text displayed below alternateName.

@property(nonatomic, copy) NSString *message
Availability
  • Available in iOS 2.0 and later.
Related Sample Code
Declared In
ABUnknownPersonViewController.h

unknownPersonViewDelegate

The unknown-person view controller delegate.

@property(nonatomic, assign) id<ABUnknownPersonViewControllerDelegate> unknownPersonViewDelegate
Discussion

The delegate must adopt the ABUnknownPersonViewControllerDelegate protocol.

Availability
  • Available in iOS 2.0 and later.
Related Sample Code
Declared In
ABUnknownPersonViewController.h