diff --git a/BZGFormViewController/BZGFormViewController.m b/BZGFormViewController/BZGFormViewController.m index e8ea6e3..d419693 100644 --- a/BZGFormViewController/BZGFormViewController.m +++ b/BZGFormViewController/BZGFormViewController.m @@ -45,6 +45,17 @@ - (id)initWithStyle:(UITableViewStyle)style return self; } +- (instancetype)initWithCoder:(NSCoder *)coder +{ + self = [super initWithCoder:coder]; + if (self) { + _formCellsBySection = [NSMutableArray array]; + _style = UITableViewStyleGrouped; + _showsValidationCell = YES; + } + return self; +} + - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; @@ -305,6 +316,10 @@ - (void)textFieldDidEndEditing:(UITextField *)textField } [self updateInfoCellBelowFormCell:cell]; + + [UIView animateWithDuration:0.3 animations:^{ + [self.tableView setContentInset:UIEdgeInsetsZero]; + }]; } - (BOOL)textFieldShouldReturn:(UITextField *)textField