草庐IT

uiinterfaceorientation

全部标签

ios - 如何在 UINavigationController 中的单个 View 上强制使用特定的 UIInterfaceOrientation?

好的,情况是这样的:我有一个应用程序,我只希望UINavigationController中的一个特定View具有横向方向。这个View是一个UIImageView,我在上面捕获签名(那部分工作很棒)。所以,像这样:previousview-->signatureview-->nextview(portrait)(landscape)(portrait)我似乎找不到一种好方法来强制设备方向在签名屏幕上横向显示。在签名View上设置纵向方向永远没有意义,因为在那个屏幕宽度上确实没有足够的空间来签名。那么,关于如何实现这一点有什么好的想法吗?我考虑过可能以模态方式执行签名View,从而脱离

ios - Swift 中 UIInterfaceOrientation 到 AVCaptureVideoOrientation 的枚举转换

我正在尝试在Swift中使用AVFoundation通常当我设置一个摄像机捕获session时,我会在objective-c中执行类似以下的操作[[cameraView.previewLayerconnection]setVideoOrientation:(AVCaptureVideoOrientation)[selfinterfaceOrientation]]在swift看来我必须做这样的事情(因为可选类型)ifletconnection=cameraView.previewLayer?.connection{connection.videoOrientation=self.inte