Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Solve a problem with the new sdk on iOS 11 that causes an extra space… #631

Merged
merged 3 commits into from
Oct 26, 2017
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Source/SLKTextViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ - (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];

// Deactivate automatic scrollView adjustment
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this code because it duplicates the code in the tableView initialization.

if (@available(iOS 11.0, *)) {
self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}

// Invalidates this flag when the view appears
self.textView.didNotResignFirstResponder = NO;

Expand Down Expand Up @@ -259,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;
}
Expand Down