无法初始化参数,我不明白为什么

Pil*_*ast 5 zxing ios

这是我得到的错误:

Cannot initialize a parameter of type 'id<ZXingDelegate>'
with an lvalue of type 'FirstViewController *const __strong'
Run Code Online (Sandbox Code Playgroud)

从这行代码:

ZXingWidgetController *widController =
    [[ZXingWidgetController alloc] initWithDelegate:self showCancel:YES
                                                           OneDMode:NO];
Run Code Online (Sandbox Code Playgroud)

我怎么解决这个问题?

Pil*_*ast 5

感谢Macmade的评论,我设法解决了这个问题.我应该这样写:

ZXingWidgetController *widController =
    [[ZXingWidgetController alloc] initWithDelegate:***(id)** self showCancel:YES 
                                                                     OneDMode:NO];
Run Code Online (Sandbox Code Playgroud)

其中(id)是他所谈论的桥接演员.