2016-11-10 38 views

回答

0

從XLFormBaseCell子類(你也可以創建自定義的廈門國際銀行,如果你喜歡使用IB),並實施

+ (void)load {  
    XLFormViewController.cellClassesForRowDescriptorTypes[@"YOUR_UNIQ_TYPE"] = NSStringFromClass([CHILD_OF_XLFormBaseCell class]); 
} 

- (void)configure { 
    [super configure]; 
} 

- (void)update { 
    [super update]; 
} 

+ (CGFloat)formDescriptorCellHeightForRowDescriptor:(XLFormRowDescriptor *)rowDescriptor; 

爲了不使用默認的操作(如XLFormRowDescriptorTypeSelectorPush),你可以重寫此方法:

- (void)formDescriptorCellDidSelectedWithFormController:(XLFormViewController *)controller { 
//anything you want, for example 
    if (self.rowDescriptor.action.formBlock) { 
     self.rowDescriptor.action.formBlock(self.rowDescriptor); 
    } 
} 

然後你就可以使用創建XLFormRowDescriptor

- (instancetype)initWithTag:(NSString *)tag rowType:(NSString *)rowType title:(NSString *)title; 
相關問題