I get this error:
Cannot initialize a parameter of type 'id<ZXingDelegate>'
with an lvalue of type 'FirstViewController *const __strong'
From this line of code:
ZXingWidgetController *widController =
[[ZXingWidgetController alloc] initWithDelegate:self showCancel:YES
OneDMode:NO];
How can I solve this?
Thanks to Macmade's comment I managed to solve the problem. I should have written it this way:
ZXingWidgetController *widController =
[[ZXingWidgetController alloc] initWithDelegate:***(id)** self showCancel:YES
OneDMode:NO];
Where (id) is the bridged cast he was talking about.
use this line off code for this issue
ZXingWidgetController *widController = [[ZXingWidgetController alloc] initWithDelegate:(id<ZXingDelegate>)self showCancel:YES OneDMode:NO];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With