这是我得到的错误:
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)
我怎么解决这个问题?
感谢Macmade的评论,我设法解决了这个问题.我应该这样写:
ZXingWidgetController *widController =
[[ZXingWidgetController alloc] initWithDelegate:***(id)** self showCancel:YES
OneDMode:NO];
Run Code Online (Sandbox Code Playgroud)
其中(id)是他所谈论的桥接演员.
| 归档时间: |
|
| 查看次数: |
9615 次 |
| 最近记录: |