0
我已經創建了一個視圖(MyOverlayView.xib)並在視圖的底部添加了一個工具欄,並將約束條件設置爲(left:0,bottom,0:right:0),我現在將它添加到UIImagePickerController中我的視圖控制器,因爲這樣的:無論設備如何,我應該如何確保工具欄位於底部?
let cameraController = UIImagePickerController()
if (cameraController != nil) {
cameraController!.mediaTypes = [kUTTypeMovie as String]
cameraController!.sourceType = .Camera
cameraController!.cameraCaptureMode = .Video
cameraController!.allowsEditing = false
cameraController!.delegate = self
cameraController!.showsCameraControls = false
self.myOverlayView = (NSBundle.mainBundle().loadNibNamed("MyOverlayView", owner: self, options: nil)[0] as! MyOverlayView)
if (self.myOverlayView != nil) {
self.myOverlayView!.frame = self.view!.frame
myOverlayView?.delegate = self;
} else {
print("view not loaded")
}
}
的問題是,雖然這似乎是坐在在界面生成器的底部,它是坐着打五折我的手機屏幕上。我應該如何確保工具欄位於底部,而不考慮設備?
的XCode 7.2.1,斯威夫特2,iOS版的9.x