在我的应用中,我正在开发一个自定义UIPickerView
来拍照。在this教程之后,我创建了一个与其.xib
子类关联的UIView
文件。我在以下屏幕截图中得到了结果:
正如你所看到的,"空间"插入按钮和其他东西完全在底部,而我想将它分成两个条,如默认模式:
这样我就可以添加"取消"按钮广告左上角。 我该怎么办?这是我的代码:
self.imagePicker = UIImagePickerController()
self.imagePicker.delegate = self
self.imagePicker.sourceType = .Camera
self.imagePicker.cameraCaptureMode = .Photo
self.imagePicker.showsCameraControls = false
self.imagePicker.modalPresentationStyle = .FullScreen
//customView stuff
let customViewController = CustomOverlayViewController(
nibName:"CustomOverlayViewController",
bundle: nil
)
let customView:CustomOverlayView = customViewController.view as! CustomOverlayView
customView.frame = self.imagePicker.view.frame
presentViewController(imagePicker, animated: true, completion: {
self.imagePicker.cameraOverlayView = customView
})