问题标签 [abaddressbook]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
699 浏览

iphone - 将联系人添加到我的表格视图中,

我有一个导入按钮,单击它会显示一个联系人视图。然后,我想从这里选择所需的联系人姓名并添加到我的表格视图中。

0 投票
1 回答
4217 浏览

iphone - Customizing Title in the NavigationBar for a ABPeoplePickerNavigationController

I have created an AddressBook kind of application where I display a list of people in a UITableView, when a person is selected an ABUnknownPersonViewController is pushed. From this ABUnknownPersonViewController the user is able (by using the built in functionality) to either add the person to a "New Contact" or "Existing Contact".

This is where my problem is located. I am using a Custom UILabel for the NavigationBar title throughout my application. And I need to be able to do this for the views that are pushed by "Add New Contact" / "Add to Existing Contact" as well.

I solved this for the "Add New Contact" by creating a category for ABNewPersonViewController, but the same approach doesn't work for the "Add to Existing Contact". I guess this might be due to the fact that is it an ABPersonPickerNavigationController that is pushed.

The change of color for the NavigationBar's tintColor works fine, but I cant find a proper way to access the title. Help that include a working example where you are able to change the title in a ABPeoplePickerNavigationController that is pushed from a ABUnknownPersonViewController would be much appriciated.

This is how the category for ABNewPersonViewController (that works) looks like:

0 投票
3 回答
3576 浏览

memory-leaks - ABRecordCopyValue 的潜在内存泄漏

我正在构建一个应用程序,它要求我从 iPhone 地址簿加载表数据源中的所有联系人。正在运行

构建和分析

对于以下代码段

我的线路可能存在内存泄漏

我真的厌倦了修复它,但无法修复。请帮帮我。

任何形式的帮助都会受到高度评价。

提前致谢!!

0 投票
1 回答
586 浏览

iphone - 在 IOS 上将图像添加到联系人时令人费解的内存泄漏

我目前在仪器的这条线上有泄漏,每次调用时我都会泄漏几百K-

当我排除以上几行时,我很好。

在整个程序中,这里只提到了dataRef。我尝试 CFrelease-ing 将其作为测试,但这会由于引用已释放的对象而导致崩溃。

我尝试将它们全部连接成一行,

但我得到了相同的结果。

我预计第一次会发生泄漏,因为众所周知 Imagenamed 会缓存图像对象,并且据报道该调用会泄漏 iOS4 之前的版本,但我不希望会持续泄漏。

有任何想法吗?之前已经在这里提出过几次相关问题,但似乎没有人有答案。

0 投票
1 回答
1111 浏览

ios - 使用 personViewController 从通讯录中删除联系人

我正在交出通讯录并成功创建它,而没有任何从通讯录中“删除联系人”的选项。

有什么方法可以从通讯录中删除联系人。

我从我那里得到了帮助OS reference library

我正在使用personViewController方法

0 投票
1 回答
221 浏览

ios - Is it possible to corrupt somehow data in iOS AddressBook via AB API?

To write some fields with strange symbols, for instance. Did anyone come across such issues? I'm evaluating an opportunity of storing my custom string field in iPhone AB and I want to know, if there is any risk to corrupt AB.

UPD:

I mean, can I do something that bad with AB data, so Contacts.app stops working?

0 投票
2 回答
6435 浏览

xcode - 按编号搜索并使用 ABAddressBook 获取图像

我希望通过我的应用程序使用数字作为键在 iphone AddressBook 中搜索,然后检索与该联系人关联的图像并将其显示在 UIImageView 上。

我尝试使用 ABAddressBook 框架,但无能为力。

任何人都可以向我建议我可以遵循的解决方案或任何替代路径。任何代码片段也会有很大帮助!!

任何形式的帮助都将是非常可观的。

提前致谢

0 投票
1 回答
623 浏览

iphone - 从地址簿中删除取消按钮

我想将地址簿显示为选项卡栏项目,因此我在选项卡栏的委托中定义了此代码:

显示了联系人列表,但导航栏中有一个取消按钮,该按钮无用,我无法将其从导航栏中删除。你能帮助我吗?谢谢

0 投票
1 回答
270 浏览

iphone - 使用 kABPersinPhoneProperty 时应用程序崩溃

我正在尝试从 iPhone 的电话簿中获取所有电话号码。但是,一旦我尝试使用 kABPersonPhoneProperty 获取号码,我的应用程序就会崩溃。代码片段在这里

我无法弄清楚其中的错误。即使运行不顺利,我也会发布所有内容。

在运行构建和分析代码部分时,我什至会遇到潜在的内存泄漏

请帮我出来。

任何形式的帮助将不胜感激。

提前致谢

0 投票
2 回答
3808 浏览

iphone - 在 ABPeoplePickerNavigationController 中自定义表格单元格

我花了一些时间在 SO 上搜索这个答案,但找不到它,所以这里是:

我从 ABPeoplePickerNavigationController 开始,当用户点击一个人时,他们将被带到一个 ABPersonViewController,他们可以在其中选择电话号码和电子邮件地址。在他们完成 ABPersonViewController 之后,他们将被带回 ABPeoplePickerNavigationController。很简单的东西。

我想要的是在他们选择电话号码或电子邮件地址后,将 detailLabel 添加到他们在 ABPeoplePickerNavigationController 中选择的表格单元格中。诸如“选择的电子邮件和电话号码”或“选择的电话号码”之类的东西。

苹果的文档说:

提供的委托方法不会处理这个问题。有没有办法在不继承自己的情况下做到这一点?而且,如果我必须继承 ABPeoplePickerNavigationController,我会重写哪个方法来更新 detailLabel?

谢谢!