我开发了一个消息传递应用程序,并希望在弹出窗口中打开一个类似于iMessage应用程序的Camera Roll界面:
如何实现此功能?
答案 0 :(得分:4)
希望这适合你
//初始化图像选择器并添加到弹出控制器
UIImagePickerController* imagePickerController= [[UIImagePickerController alloc] init];
imagePickerController.delegate=self;
imagePickerController.sourceType= UIImagePickerControllerSourceTypePhotoLibrary;
popoverController= [[UIPopoverController alloc] initWithContentViewController:imagePickerController];
[popoverController presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];