当我写最下面的Swift代码时,我得到了“调用中的额外参数”。语法是错误的还是有其他问题?谢谢。
目标C初始值设定项:

typedef void(^CameraSettingsBlock)(DBCameraView *cameraView, id container);
- (id) initWithDelegate:(id<DBCameraViewControllerDelegate>)delegate cameraSettingsBlock:(CameraSettingsBlock)block;

快速初始化:
var cameraContainer = DBCameraContainerViewController(delegate: self, cameraSettingsBlock:{
        (cameraView:DBCameraView, container:DBCameraContainerViewController) in
        cameraView.photoLibraryButton.hidden = true
})

最佳答案

知道了!我需要一个!使用DBCameraView并需要将dbcameracontainervewcontroller切换到任何对象!谢谢大家!

var cameraContainer = DBCameraContainerViewController(delegate: self, cameraSettingsBlock:{
    (cameraView:DBCameraView!, container:AnyObject!) in
    cameraView.photoLibraryButton.hidden = true
})

关于objective-c - Swift(DBCamera)无法识别Obj C Init,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/24722216/

10-08 20:50