ios - How to trigger IBAction from UIButton in Storyboard static cell? -


i have storyboard uitableviewcontroller. in controller, have static cells 1 of them subclass of uitableviewcell. in ib added uibutton static cell , connected ibaction in uitableviewcell subclass. however, ibaction never called. why doesn't work? how can achieve desired behaviour button inside cell triggers event through ib?

.h

#import <uikit/uikit.h>  @interface bsworkoutscell : uitableviewcell  @property (nonatomic, weak) iboutlet uibutton *button; @property (nonatomic, strong) iboutletcollection(uibutton) nsarray *buttons;  - (ibaction)tapbutton:(id)sender; @end 

.m

- (ibaction)tapbutton:(id)sender{     if (!_buttonshidden){         [self animatehidebuttons:(uibutton *)sender];         _buttonshidden = yes;     } } 

images

enter image description here

enter image description here

i realised uitableviewcell had user interaction enabled unchecked in ib. made subviews inside not interactive, buttons not being pressed, , ibaction not being called.

once checked box, worked fine.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -