iPad 问题:使用 UIImagePickerController 和 UIPopoverController 选择视频
这是我的第一个问题。
我正在开发一个 iPad 应用程序,允许用户选择视频、修剪它,然后选择它。我首先为 iPhone 制作了它的原型,一切都运行良好。然后我将代码移植到 iPad,将 modelviewcontroller 更改为 popupviewcontroller,然后我遇到了一个奇怪的问题。没有选择按钮,只有播放按钮。所以弹出窗口有效,您可以转到视频,但只有一个播放图标,没有选择? iPhone 的完全相同的代码显示选择?我错过了什么吗?
// Settings for the picker
imagePicker = [[UIImagePickerController alloc]init];
imagePicker.delegate = self;
imagePicker.allowsEditing = YES;
imagePicker.videoMaximumDuration = 10;
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
imagePicker.mediaTypes =[UIImagePickerController availableMediaTypesForSourceType:imagePicker.sourceType];
//settings for the popup
UIPopoverController *controller2 = [[UIPopoverController alloc] initWithContentViewController:imagePicker];
self.popoverVideoSelectController = controller2;
[controller2 release];
[self.popoverVideoSelectController presentPopoverFromRect:loadVideo1Button.frame inView:videoToolsLeft permittedArrowDirections:UIPopoverArrowDirectionDown animated:YES];
this is my first ever question.
I am developing a iPad app that allows a user to select a video, trim it and then choose it. I first prototyped it for the iPhone and everything work fine. I then ported the code to the iPad, changed the modelviewcontroller for a popupviewcontroller and I get a odd problem. There is no choose button, only a play button. So the popup works, you can go to a video, but only a play icon exists, no choose? The exact same code for the iphone shows a choose? Have I missed something?
// Settings for the picker
imagePicker = [[UIImagePickerController alloc]init];
imagePicker.delegate = self;
imagePicker.allowsEditing = YES;
imagePicker.videoMaximumDuration = 10;
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
imagePicker.mediaTypes =[UIImagePickerController availableMediaTypesForSourceType:imagePicker.sourceType];
//settings for the popup
UIPopoverController *controller2 = [[UIPopoverController alloc] initWithContentViewController:imagePicker];
self.popoverVideoSelectController = controller2;
[controller2 release];
[self.popoverVideoSelectController presentPopoverFromRect:loadVideo1Button.frame inView:videoToolsLeft permittedArrowDirections:UIPopoverArrowDirectionDown animated:YES];
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,我添加了自己的工具栏按钮,它取代了使用按钮
It turns out that I was adding my own toolbarbutton which was replacing the use one