iPad 问题:使用 UIImagePickerController 和 UIPopoverController 选择视频

发布于 2024-09-10 20:09:36 字数 1016 浏览 4 评论 0原文

这是我的第一个问题。

我正在开发一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

总以为 2024-09-17 20:09:36

事实证明,我添加了自己的工具栏按钮,它取代了使用按钮

It turns out that I was adding my own toolbarbutton which was replacing the use one

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文