XLForm在这种表单填写的情况下非常好用:
Paste_Image.png不需要管理键盘是否遮挡界面非常实用。代码如下:
XLFormDescriptor * form;
XLFormSectionDescriptor * section;
XLFormRowDescriptor * row;
form = [XLFormDescriptor formDescriptor];
section = [XLFormSectionDescriptor formSection];
[form addFormSection:section];
// 家长姓名
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"ParentName" rowType:XLFormRowDescriptorTypeText title:@"姓名:"];
[row.cellConfig setObject:[UIFont systemFontOfSize:15] forKey:@"textLabel.font"];
[section addFormRow:row];
// 学校名
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"SchoolName" rowType:XLFormRowDescriptorTypeText title:@"学校名:"];
[row.cellConfig setObject:[UIFont systemFontOfSize:15] forKey:@"textLabel.font"];
[section addFormRow:row];
// 学号
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"StudentNum" rowType:XLFormRowDescriptorTypeInteger title:@"学号:"];
[row.cellConfig setObject:[UIFont systemFontOfSize:15] forKey:@"textLabel.font"];
[section addFormRow:row];
self.form = form;
网友评论