美文网首页
XLForm 自定义Cell

XLForm 自定义Cell

作者: Darren_xu | 来源:发表于2017-03-05 15:51 被阅读883次

在cell中重写load方法

+(void)load
{
    [XLFormViewController.cellClassesForRowDescriptorTypes setObject:[XLFormInlineSegmentedControl class] forKey:XLFormRowDescriptorTypeSegmentedControl];
}
XLFormRowDescriptor *customRowDescriptor = [XLFormRowDescriptor formRowDescriptorWithTag:kCustomRowText rowType:@"XLFormRowDescriptorTypeCustom"];
    // Must set custom cell or add custom cell to cellClassesForRowDescriptorTypes dictionary before XLFormViewController loaded
    customRowDescriptor.cellClass = [XLFormCustomCell class];
    [section addFormRow:customRowDescriptor];

相关文章

网友评论

      本文标题:XLForm 自定义Cell

      本文链接:https://www.haomeiwen.com/subject/amgiittx.html