ios - Set category class as delegate in parent class -
i have uiviewcontroller named editnoteviewcontroller_ipad , have create category class editnoteviewcontroller_ipad (operation).
this category contain delegate methods.
my setdelegate method in editnoteviewcontroller_ipad can not transfer category class.
now getting warning on setdelegate method follow:
sending 'editnoteviewcontroller_ipad *const __strong' parameter of incompatible type 'id<znvideoviewdelegate>' line show warning in editnoteviewcontroller_ipad :
[video setdelegate:self]; how can remove warning?
my project working fine. want remove warning.
you need declare editnoteviewcontroller_ipad class conforms znvideoviewdelegate protocol. @interface in header should similar this:
@interface editnoteviewcontroller_ipad : uiviewcontroller <znvideoviewdelegate> {...} ^^^^^^^^^^^^^^^^^^^ edit: if implemented protocol in category, need import category's header in .m file set delegate, compiler knows class conforms protocol.
Comments
Post a Comment