File tree Expand file tree Collapse file tree 3 files changed +29
-2
lines changed
PAYFormBuilder.xcworkspace/xcshareddata
PAYFormBuilder/controller Expand file tree Collapse file tree 3 files changed +29
-2
lines changed Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+ <plist version =" 1.0" >
4+ <dict >
5+ <key >IDEDidComputeMac32BitWarning </key >
6+ <true />
7+ </dict >
8+ </plist >
Original file line number Diff line number Diff line change 1717 */
1818@interface PAYFormTableViewController : UITableViewController
1919
20+ /* *
21+ * If tapping on the background of the form (i.e. outside of a cell) should dismiss the keyboard/end editing.
22+ *
23+ * Enabled by default. Must be updated in the `initForm` method to be applied.
24+ */
25+ @property (nonatomic , assign ) BOOL tapToEndEditing;
26+
2027/* *
2128 * This method could be overriden by the subclass to configure the form table view controller.
2229 * For example a custom footer could be set. This is method is only called once after the view
Original file line number Diff line number Diff line change @@ -26,6 +26,15 @@ @interface PAYFormTableViewController ()
2626
2727@implementation PAYFormTableViewController
2828
29+ - (instancetype )init
30+ {
31+ self = [super init ];
32+ if (self) {
33+ _tapToEndEditing = YES ;
34+ }
35+ return self;
36+ }
37+
2938- (void )loadView {
3039 self.tableView = [[PAYFormTableView alloc ] initWithFrame: CGRectZero
3140 style: UITableViewStyleGrouped];
@@ -46,8 +55,11 @@ - (void)viewDidLoad {
4655 [self loadStructure ];
4756
4857 [super viewDidLoad ];
49-
50- [self .tableView enableTapToEndEditing ];
58+
59+ if (self.tapToEndEditing )
60+ {
61+ [self .tableView enableTapToEndEditing ];
62+ }
5163
5264 [self buildFooter ];
5365}
You can’t perform that action at this time.
0 commit comments