将图片图像插入 iPhone 应用程序联系页面中的 ABUnknownPersonViewController 视图
我正在处理 iPhone 应用程序的“关于”部分。 我想将一些贡献者详细信息显示为标准 ABUnknownPersonViewController 视图。 我正在使用简单的“学校”代码创建人物视图:
ABRecordRef aContact = ABPersonCreate();
ABMultiValueAddValueAndLabel(email, @"[email protected]", kABOtherLabel, NULL);
ABRecordSetValue(aContact, kABPersonEmailProperty, email, &anError);
ABUnknownPersonViewController *picker =[[ABUnknownPersonViewController alloc] init];
picker.displayedPerson = aContact;
picker.alternateName = person.fullName;
picker.title = [NSString stringWithFormat:@"About %@", person.firstName];
picker.message = person.message;
...等等...
但是 - 我还没有找到任何解决方案如何将人物图片插入到 ABUnknownPersonViewController 图像/图片 字段使用
。
有人知道是否可能吗?我没有运气使用谷歌找到任何片段。有很多关于多值示例等...但没有关于为“未知”联系人插入图像的内容。
嗯..这让我有点担心
提前感谢您的任何提示。
I am working on 'About" section of my iPhone application.
I want to show some of the contributors details as a standard ABUnknownPersonViewController view.
I am creating person view using simple 'school' code:
ABRecordRef aContact = ABPersonCreate();
ABMultiValueAddValueAndLabel(email, @"[email protected]", kABOtherLabel, NULL);
ABRecordSetValue(aContact, kABPersonEmailProperty, email, &anError);
ABUnknownPersonViewController *picker =[[ABUnknownPersonViewController alloc] init];
picker.displayedPerson = aContact;
picker.alternateName = person.fullName;
picker.title = [NSString stringWithFormat:@"About %@", person.firstName];
picker.message = person.message;
... and so on ....
However - I haven't found any solution how to insert person picture to the ABUnknownPersonViewController image/picture field using <AddressBook/AddressBook.h>
.
Anybody knows if it is possible? I have no luck to find any snippet using google. There is plenty about multi-values examples, etc... but nothing about inserting image for a 'unknown' contact.
Hmm.. it worries me a bit
Thank You in advance for any hints.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这应该有效
这就是我过去的做法,并且有效。基本上创建图像数据并将其设置为联系人。
希望有帮助
This should work
Thats how I've done it in the past and it works. Basically create the image data and the set it for aContact.
Hope that helps