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;