简体   繁体   English

是否可以在故​​事板上将自定义UIImagePickerController类与viewController连接起来

[英]Is it possible to wire up a custom UIImagePickerController class with a viewController on the storyboard

I want this class to wire up with a storyboard scene. 我希望这个课程与故事板场景相连。 The current result is that my storyboard view controller displays my saved photos album. 目前的结果是我的故事板视图控制器显示我保存的照片相册。 i want to customise this class so it displays the camera. 我想自定义这个类,以便它显示相机。 Is there a way to do this here without having to create a UIViewController class and create and display a UIImagePickerController within that? 有没有办法在这里做到这一点,而不必创建一个UIViewController类,并在其中创建和显示UIImagePickerController? Reason being is I am using a UIPageController so dont want to have to call a modal imagepickervc. 原因是我正在使用UIPageController所以不想要调用模态imagepickervc。

class CameraViewController: UIImagePickerController {

override func viewDidLoad() {
    super.viewDidLoad()



}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
}

From the UIImagePickerController class reference 来自UIImagePickerController类的引用

IMPORTANT 重要

The UIImagePickerController class supports portrait mode only. UIImagePickerController类仅支持纵向模式。 This class is intended to be used as-is and does not support subclassing. 此类旨在按原样使用,不支持子类化。

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

相关问题 故事板中的自定义表ViewController - Custom Table ViewController in a StoryBoard 故事板自定义类属性未显示 - Storyboard custom class attribute not showing up 情节提要ViewController的自定义类设置为不带有Xib的ViewController时显示黑色 - Storyboard viewcontroller's custom class set as a viewcontroller without xib shows black 故事板上的UIImagePickerController吗? - UIImagePickerController in storyboard? 是否可以制作完全自定义的UIImagePickerController? - Is it possible to make a completely custom UIImagePickerController? 是否可以在一个快速项目中实例化一个Storyboard构建的ViewController作为导入的目标C类? - Is it possible to instantiate a Storyboard builded ViewController in a swift project as an imported objective C class? 如何在XCode UI中将情节提要线连接到Swift代码? - How do I wire up the storyboard to Swift code in XCode UI? 是否可以以编程方式设置 ViewController Storyboard ID? - Is this possible to Set ViewController Storyboard ID programmatically? 未在模拟器中创建的自定义UIView故事板类,在界面生成器中显示 - Custom UIView storyboard class not created in simulator, shows up in interface builder 以编程方式将UIButton添加到自定义ViewController的情节提要 - Programmatically add UIButton to custom ViewController with storyboard in place
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM