From 0fcbba9c03dcbe651cbdb49e938889d8fb833d10 Mon Sep 17 00:00:00 2001 From: Tech Coverfy Date: Fri, 29 Sep 2017 11:39:19 +0200 Subject: [PATCH 1/3] Solve a problem with the new sdk on iOS 11 that causes an extra space in the bottom due to automatic content inset adjustment. --- Source/SLKTextViewController.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/SLKTextViewController.m b/Source/SLKTextViewController.m index 33d959bf..ff8d5197 100644 --- a/Source/SLKTextViewController.m +++ b/Source/SLKTextViewController.m @@ -186,6 +186,11 @@ - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; + // Deactivate automatic scrollView adjustment + if (@available(iOS 11.0, *)) { + self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } + // Invalidates this flag when the view appears self.textView.didNotResignFirstResponder = NO; From f3cefb18eea96899f0264f41c6ba0b3b2061ac1a Mon Sep 17 00:00:00 2001 From: Tech Coverfy Date: Tue, 17 Oct 2017 10:01:56 +0200 Subject: [PATCH 2/3] Changes the place where the inset property is adjusted and add the tag 1.9.6 --- Source/SLKTextViewController.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/SLKTextViewController.m b/Source/SLKTextViewController.m index ff8d5197..365af7fa 100644 --- a/Source/SLKTextViewController.m +++ b/Source/SLKTextViewController.m @@ -264,6 +264,11 @@ - (UITableView *)tableViewWithStyle:(UITableViewStyle)style _tableView.dataSource = self; _tableView.delegate = self; _tableView.clipsToBounds = NO; + + // Deactivate automatic scrollView adjustment + if (@available(iOS 11.0, *)) { + _tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } } return _tableView; } From 15ac2d4207875b31a516f05cbdb07fb568c2c69a Mon Sep 17 00:00:00 2001 From: Josep Bordes Date: Wed, 25 Oct 2017 18:12:08 +0200 Subject: [PATCH 3/3] Delete duplicated code --- Source/SLKTextViewController.m | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Source/SLKTextViewController.m b/Source/SLKTextViewController.m index 365af7fa..7f5c415b 100644 --- a/Source/SLKTextViewController.m +++ b/Source/SLKTextViewController.m @@ -186,11 +186,6 @@ - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; - // Deactivate automatic scrollView adjustment - if (@available(iOS 11.0, *)) { - self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; - } - // Invalidates this flag when the view appears self.textView.didNotResignFirstResponder = NO;