简体   繁体   English

如何仅在IOS中以人像模式打开相机

[英]How can i open the camera in the portrait mode only in IOS

Can anyone suggest a way of opening the camera in the portrait mode only in IOS. 谁能建议仅在IOS中以纵向模式打开相机的方法。 My case is like this - i have a parent view which is supporting both orientation. 我的情况是这样的-我有一个支持两个方向的父视图。 On top of this parent view i want to present a camera view controller in the portrait mode (independent of which mode the parent view is). 在此父视图的顶部,我想以纵向模式(独立于父视图的模式)呈现一个摄像机视图控制器。

Thanks in advance 提前致谢

Try implementing the following method in CameraController 尝试在CameraController中实现以下方法

    - (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations.
return YES;}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 iOS 6 - 强制肖像模式仅不起作用 - iOS 6 - Force portrait mode only not working 如何将视图从纵向模式更改为横向模式? - How can I change the view from portrait to landscape mode? 如何在iOS上的纵向模式下使UINavigationBar更高? - How to make UINavigationBar taller in portrait mode on iOS? 如何在 iPhone 应用程序上仅支持纵向模式 - How to support only portrait mode on an iPhone app 如何设计仅在ipad的横向模式和iPhone的纵向模式下运行的iOS应用? - How to design an iOS app which runs only in landscape mode in ipad and portrait in iPhone? 如何用闪光模式打开相机 - How to open camera with flash mode 我可以以人像模式播放视频吗? - Can i play video in portrait mode? 如何仅将iPad和iPhone的网页方向固定为纵向? - How can I fix the webpage orientation to Portrait only for iPad and iPhone? pushViewController:-当设备处于横向模式时,如何在仅纵向模式下显示? - pushViewController: - how to display in portrait only mode, when device is in landscape mode? 如何“旋转图像,仅当它处于纵向模式时(但不是在landScape模式下)” - How it is possible to 'rotate image, only if it is in portrait mode (But not in landScape mode)'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM