全屏显示ipad2相机?

发布于 2024-10-27 04:24:28 字数 184 浏览 3 评论 0原文

我想在 iPad2 上以全屏模式显示 UIImagePickerControllerpresentModalViewController: 似乎对我不起作用。 它显示带有捕获按钮的帧,但不显示正在捕获的内容的视频预览?

有人以前遇到过同样的问题,现在如何解决?

谢谢

I want to show UIImagePickerController in fullscreen mode for iPad2.
presentModalViewController: appears not work for me.
It show the frame with capture button but not show video preview of what is being capture?

Anyone got same problem before and now how to solve?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

中二柚 2024-11-03 04:24:28

使用AVFoundation框架,
然后可以将 AVCaptureVideoPreviewLayer 设置为全屏。

Use the AVFoundation framework,
the AVCaptureVideoPreviewLayer can then be set to full screen.

任性一次 2024-11-03 04:24:28

这对我有用:

UIImagePickerController *controller = [[UIImagePickerController alloc] init];
controller.sourceType = UIImagePickerControllerSourceTypeCamera;
controller.allowsEditing = NO;
controller.delegate = self;
[self presentModalViewController:controller animated:YES];

请注意 self 是当前视图控制器。

This works for me:

UIImagePickerController *controller = [[UIImagePickerController alloc] init];
controller.sourceType = UIImagePickerControllerSourceTypeCamera;
controller.allowsEditing = NO;
controller.delegate = self;
[self presentModalViewController:controller animated:YES];

Note that self is the current view controller.

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