ios - How to instantiate a Custom UIButton in UITableViewCell -
i have uitableviewcell , cells contain uibutton subclass (coolbutton). have picked code of coolbutton raywenderlich tutorial available here
in ib have created subclass of uitableviewcell , have configured class of button coolbutton , set property type custom , configured iboutlet coolbutton uitableview subclass.
my problem when cells created, uibutton instead of coolbutton. consequence when i'm setting properties of coolbutton crash "unrecognized selector".
why uibutton instantiated instead of coolbutton? how can coolbutton in table?
thanks,
séb.
i'm going guess doing like:
coolbutton *b = [uibutton ...]
you need create using coolbutton class:
coolbutton *b = [coolbutton ....];
or, if used ib, created uibutton used iboutlet of coolbutton. need make actual class of button drag ib coolbutton, can selecting button , tapping (i think) second left top tab in inspector.
Comments
Post a Comment