显示自定义联系信息
所以我有一个 MKMapView,并且在它上面有一个带有公开按钮的图钉。我希望用户能够点击公开按钮和导航控制器来推送新的视图控制器。但我希望新的视图控制器看起来像联系人应用程序中标准的联系人 viewController
。我需要它来显示自定义联系信息,因为该联系人不会在用户联系人中。我一直在玩 ABPerson,但我无法弄清楚。我希望该联系页面看起来与标准页面完全相同。这就是我一直在玩的:
ABPersonViewController *view = [[ABPersonViewController alloc] init];
ABPerson *person;
ABRecordRef ABPersonCreate (
void
);
view.personViewDelegate = self;
view.displayedPerson = person;
view.allowsEditing = NO;
[self.navigationController pushViewController:view animated:YES];
[view release];
我不太确定该怎么做。我想要显示的联系信息包括公司名称、地址、电话号码等。
预先非常感谢您。
So I have an MKMapView
and I have a pin on it with a disclosure button. I want the user to be able to tap the disclosure button and the navigation controller to push a new view controller. But I want that new view controller to look like the contacts viewController
that comes standard in the contacts app. I need it to display custom contact information because the contact will not be in the users contacts. I have been playing around with ABPerson, but I can't figure it out. I want that contact page to look exactly like the standard page. This is what I've been playing with:
ABPersonViewController *view = [[ABPersonViewController alloc] init];
ABPerson *person;
ABRecordRef ABPersonCreate (
void
);
view.personViewDelegate = self;
view.displayedPerson = person;
view.allowsEditing = NO;
[self.navigationController pushViewController:view animated:YES];
[view release];
I'm not really sure what to do. The contact information I want to display will include Business title, Address, Phone Number, and stuff like that.
Thank you very much in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是应该如何完成的:
然后响应
[self personObject]
Here is how it should be done:
and than to respond to the
[self personObject]