使用地址簿作为数据源(Use Address Book as Data Source)

编程入门 行业动态 更新时间:2024-10-27 07:31:10
使用地址簿作为数据源(Use Address Book as Data Source)

我将使用地址簿作为我应用程序的数据源,以用于添加新联系人或选择联系人。 联系人主要面向公司或组织,但可以是一个人。

为了添加新的联系人,我想显示一个联系人列表,就像人们选择控制一样:

alt text http://developer.apple.com/iphone/library/documentation/ContactData/Conceptual/AddressBookProgrammingGuideforiPhone/Art/people_picker.jpg

但是,我不知道要更改取消添加和组作为取消。 看起来,我无法将此控制器的导航栏设置为添加。 基本上,我想显示一个联系人列表作为我的添加数据源,并在同一视图中提供添加功能,如果用户想要先添加一个联系人作为数据源。

Apple的地址簿编程指南确实提供了一个ABNewPersonViewController来添加新联系人。 有什么方法可以将它添加到所有联系人选择器作为其导航树? 有没有人在苹果的例子列表中看到类似的示例代码(太多了解)?

另一个相关的问题是,当显示人员选取器控制器时,它从下到上显示动画。 有没有什么办法像导航下钻动画一样从左侧控制它的动画?

I am going to use Address Book as my app's data source for use to add new contact or select a contact. The contact is mainly for company or organization, but it can be a person.

For adding a new contact, I would like to show a list of contacts, like people pick control:

alt text http://developer.apple.com/iphone/library/documentation/ContactData/Conceptual/AddressBookProgrammingGuideforiPhone/Art/people_picker.jpg

However, I cannot figure out to change Cancel to Add, and Groups as Cancel. It looks like that there is no way I can set this controller' navigation bar to Add. Basically, I would like to display a list of contacts to choose as my add data source, and to provide Add function in the same view if user wants to add new one to the contact first and as data source.

Apple's Address Book Programming Guideline does provide one ABNewPersonViewController to add a new contact. Is there any way to add this to all contacts picker as its navigation tree? Does any one see similar example codes in Apple's example list(just too many to find out)?

Another related issue is that when the people picker controller is shown, it appears with animation from bottom up. Is there any way to control its animation from left just like navigation drill-down animation?

最满意答案

我的建议是:使用ABPeoplePickerNavigationController并添加一个工具栏到底部有一个添加按钮。 添加按钮将打开一个ABNewPersonViewController。

My recommendation: use a ABPeoplePickerNavigationController and add a toolbar to the bottom that has an Add button. The Add button would open a ABNewPersonViewController.

更多推荐

本文发布于:2023-04-27 13:41:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1326159.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数据源   地址   Address   Source   Data

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!