您的位置:首页 > 产品设计 > UI/UE

ABAddressBook & AddressBook UI 文件介绍(IOS开发)

2012-09-29 10:35 369 查看
原文链接地址:http://what-when-how.com/ios-4/accessing-the-address-book-ios-4/

下图为 文章的核心部分。介绍了两个 ios addressbook 和addressbook UI 系统frame,有一些不了解的,看看后再编程,会有很大帮助

In this section, we’ll provide a basic reference that supplements Apple’s own tutorial, but we suggest you read their guide for
more extensive information. We’ll look at the Address Book frameworks, show how to access the Address Book’s properties, and explain how to use the Address Book UI.

Table 9.3 lists many of the most important classes in the frameworks. Table 9.3 The Address Book classes, the framework they belong to, and what they do

Class
Framework
Summary
ABAddressBook
Address Book
Interface for accessing and changing the Address Book; may not be required if you use the Address Book UI framework
ABNewPersonViewController
Address Book UI
Interface for entering new record manually
ABPeoplePickerNavigationController
Address Book UI
Interface for selecting users and properties
ABPersonViewController
Address Book UI
Interface for displaying and editing records
ABUnknownPersonViewController
Address Book UI
Interface for displaying "fake" contact and possibly adding it to Address Book
ABGroup
Address Book
Opaque type giving access to the records of groups
ABPerson
Address Book
Opaque type giving access to the records of individual people
ABRecord
Address Book
Record providing information on a person or group
ABMultiValue
Address Book
Type containing multiple values, each with its own label; its precise use is defined in ABPerson, where it’s applied to addresses, dates, phone numbers, instant messages, URLs, and related names
ABMutableMultiValue
Address Book
An ABMultiValue whose values can be modified
Each of these classes contains numerous functions that can be used to build Address Book
projects. We’ll talk about a few important functions and point you to the class references for the rest.


Accessing Address Book properties

As you’ll see shortly, the Address Book and Address Book UI frameworks
ultimately provide different ways of accessing the Contacts data information: you might be working with the Address Book programmatically, or a user may be making selections through fancy UIs.
Ways to select individual contacts may vary, but after a contact has been selected, you’ll generally use the same getter and setter functions to work with that record. These important functions are listed in table 9.4.

Table 9.4 Property setters and getters are among the most important functions in the Address Book.

Function
Arguments
Summary
ABRecordCopyValue
ABRecordRef, property
Looks up a specific property from a specific record
ABRecordSetValue
ABRecordRef, property, value, &error
Sets a property to a value in a record
ABMultiValueGetCount
ABMultiValue
Returns the size of a multivalue (which can contain one or more copies of a record, such as multiple phone numbers)
ABMultiValueCopyLabelAtIndex
ABMultiValueRef,index
Looks up the label of an entry in a multivalue
ABMultiValueCopyValueAtIndex
ABMultiValueRef,index
Looks up the content of an entry in a multivalue
ABCreateMutableCopy
ABMultiValueRef
Creates a copy of a multivalue
ABMultiValueReplaceLabelAtIndex
ABMutableMultiValueRef, label, index
Replaces a label at an index in a multivalue

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息