XLForm icon indicating copy to clipboard operation
XLForm copied to clipboard

can i set custom row click event?

Open williambao opened this issue 12 years ago • 3 comments

hi, can i set my custom row click event? i try to set the tableview 'didSelectRowAtIndexPath' delegate, then all xlform row's click event is can't work. how can i to do these ? thanks very much:)

williambao avatar Jul 23 '14 14:07 williambao

trying calling super as well

shams-ahmed avatar Jul 23 '14 15:07 shams-ahmed

Instead of using UITableViewDelegate, you can use the XLFormViewControllerDelegate which might be more appropriate.

-(void)didSelectFormRow:(XLFormRowDescriptor *)formRow
 {
     [super didSelectFormRow:formRow];

     if ([formRow.tag isEqual:@"mytag"]) {
        // do your thing for your row.
    }
}

bhirt-bpl avatar Aug 04 '14 04:08 bhirt-bpl

@williambao @shams-ahmed @bazik123 If you are setting up a XLFormRowDescriptorTypeButton you can also configure tap event handlers by either assigning a block or a selector to action.formBlock or action.formSelector respectively. action is a XLFormRowDescriptor property only available on master branch for now.

mtnbarreto avatar Feb 02 '15 19:02 mtnbarreto