在选项卡视图中加载的地址簿
我有一个我认为很简单的任务。
我有一个示例项目,它允许用户单击按钮在视图中调出 AddressBook 用户界面。据我所知,大部分工作都是在这里完成的:
-(IBAction) checkOutBookid)sender
{
ABPeoplePickerNavigationController *peoplePicker=[[ABPeoplePickerNavigationController alloc] init];
[peoplePicker setPeoplePickerDelegate:self];
[self.navigationController presentModalViewControllereoplePicker animated:YES];
[peoplePicker release];
}
并且视图上有一个按钮,其中 TouchUp Inside 链接到此操作。现在,我不需要单击按钮,而是想要一个已加载 AddressBook
的视图。我尝试将上面的代码( {}
之间的所有内容)放入 ViewController 的
didLoad
事件中。不,那不起作用。我导入了AB框架。我没有收到任何错误,只是视图加载时没有任何内容。
我缺少什么?
I have what I thought would be a simple task.
I have a sample project that will let a user click a button to pull up the AddressBook user interface within a view. From what I see most of the work is done here:
-(IBAction) checkOutBookid)sender
{
ABPeoplePickerNavigationController *peoplePicker=[[ABPeoplePickerNavigationController alloc] init];
[peoplePicker setPeoplePickerDelegate:self];
[self.navigationController presentModalViewControllereoplePicker animated:YES];
[peoplePicker release];
}
And there is a button on a view has TouchUp Inside linked to this action. Now, instead of clicking a button, I want a view to just have the AddressBook
already loaded. I tried putting the code above (everything between the {}
) in the ViewController's
didLoad
event. Nope, that didn't work. I have the AB frameworks imported. I don't get any errors, it's just the view loads with nothing in it.
What am I missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这似乎有效:
This seems to work: