Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 以编程方式将ABPersonPicker(UIAddressBook)嵌入UIAbbarController中_Iphone_Xcode_Abaddressbook - Fatal编程技术网

Iphone 以编程方式将ABPersonPicker(UIAddressBook)嵌入UIAbbarController中

Iphone 以编程方式将ABPersonPicker(UIAddressBook)嵌入UIAbbarController中,iphone,xcode,abaddressbook,Iphone,Xcode,Abaddressbook,我想在我的uitabarcontroller中显示一个UIAddressBook(它也嵌入在UINavigationController中),而不是每次都以模式显示它。换句话说,我想访问一个已经存在的选项卡栏控制器和导航控制器中的地址簿。当我以模式显示它时,这两个视图消失了,因为这是一个全新的视图。但是,我找不到嵌入它的文档。有人有什么建议吗 好处:可以从sqlite数据库从NSDictionary加载姓氏列表吗 答案很简单 picker = [[ABPeoplePickerNavigation

我想在我的
uitabarcontroller
中显示一个
UIAddressBook
(它也嵌入在
UINavigationController
中),而不是每次都以模式显示它。换句话说,我想访问一个已经存在的选项卡栏控制器和导航控制器中的地址簿。当我以模式显示它时,这两个视图消失了,因为这是一个全新的视图。但是,我找不到嵌入它的文档。有人有什么建议吗


好处:可以从sqlite数据库从NSDictionary加载姓氏列表吗

答案很简单

picker = [[ABPeoplePickerNavigationController alloc] init];
// place the delegate of the picker to the control
picker.peoplePickerDelegate = self;
picker.view.frame = self.view.bounds;
[self.view addSubview:picker.view];
诀窍是将框架设置为
self.view.bounds
;那是为了我