ios - How do I use self type in a header file in objective c -
this question has answer here:
i need define protocol inside class, 1 of method need type of class parameter, how use self type here?
code:
// myclass.h @protocol delegate - (void)method:(myclass *)myclass; @end @interface myclass : uiview // properties , methods @end
it gives error "expected type" indicates myclass not recognized type.
use "@class myclass;" @protocol delegate
Comments
Post a Comment