From 4aea1cfedb0e06dba1544b96af8daf0d07e81f23 Mon Sep 17 00:00:00 2001 From: Pavel Yankelevich Date: Mon, 18 Sep 2017 16:42:03 +0300 Subject: [PATCH] An option to use 3rd party (like a IQKeyboardManager) row navigation --- XLForm/XL/Controllers/XLFormViewController.m | 6 ++++++ XLForm/XL/Descriptors/XLFormDescriptor.h | 1 + 2 files changed, 7 insertions(+) diff --git a/XLForm/XL/Controllers/XLFormViewController.m b/XLForm/XL/Controllers/XLFormViewController.m index 77ac1644..ed32721f 100755 --- a/XLForm/XL/Controllers/XLFormViewController.m +++ b/XLForm/XL/Controllers/XLFormViewController.m @@ -509,6 +509,9 @@ - (void)contentSizeCategoryChanged:(NSNotification *)notification - (void)keyboardWillShow:(NSNotification *)notification { + if (_form.rowNavigationOptions == XLFormRowNavigationOption3rdParty) + return; + UIView * firstResponderView = [self.tableView findFirstResponder]; UITableViewCell * cell = [firstResponderView formDescriptorCell]; if (cell){ @@ -535,6 +538,9 @@ - (void)keyboardWillShow:(NSNotification *)notification - (void)keyboardWillHide:(NSNotification *)notification { + if (_form.rowNavigationOptions == XLFormRowNavigationOption3rdParty) + return; + UIView * firstResponderView = [self.tableView findFirstResponder]; UITableViewCell * cell = [firstResponderView formDescriptorCell]; if (cell){ diff --git a/XLForm/XL/Descriptors/XLFormDescriptor.h b/XLForm/XL/Descriptors/XLFormDescriptor.h index 944d5009..bed56672 100644 --- a/XLForm/XL/Descriptors/XLFormDescriptor.h +++ b/XLForm/XL/Descriptors/XLFormDescriptor.h @@ -43,6 +43,7 @@ typedef NS_OPTIONS(NSUInteger, XLFormRowNavigationOptions) { XLFormRowNavigationOptionStopDisableRow = 1 << 1, XLFormRowNavigationOptionSkipCanNotBecomeFirstResponderRow = 1 << 2, XLFormRowNavigationOptionStopInlineRow = 1 << 3, + XLFormRowNavigationOption3rdParty = 1 << 4 }; @class XLFormSectionDescriptor;