ios - XLForm Custom Row with Image and Text and Push Controller on Action Objective C -
i using xlform
xlformrowdescriptor
. else working fine have requirement want use custom row images , text. in addition need xlformrowdescriptortypeselectorpush
on xlformrowdescriptor action
.
subclass xlformbasecell (you can create custom xib if prefer use ib), , implement
+ (void)load { xlformviewcontroller.cellclassesforrowdescriptortypes[@"your_uniq_type"] = nsstringfromclass([child_of_xlformbasecell class]); } - (void)configure { [super configure]; } - (void)update { [super update]; } + (cgfloat)formdescriptorcellheightforrowdescriptor:(xlformrowdescriptor *)rowdescriptor;
to not use default actions (like xlformrowdescriptortypeselectorpush) can override method:
- (void)formdescriptorcelldidselectedwithformcontroller:(xlformviewcontroller *)controller { //anything want, example if (self.rowdescriptor.action.formblock) { self.rowdescriptor.action.formblock(self.rowdescriptor); } }
then able create xlformrowdescriptor using
- (instancetype)initwithtag:(nsstring *)tag rowtype:(nsstring *)rowtype title:(nsstring *)title;
Comments
Post a Comment