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

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

merged 3 commits into from
Oct 26, 2017

Conversation

josepbordesjove
Copy link
Contributor

… in the bottom due to automatic content inset adjustment.

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've been mindful about doing atomic commits, adding documentation to my changes, not refactoring too much.
  • I've a descriptive title and added any useful information for the reviewer. Where appropriate, I've attached a screenshot and/or screencast (gif preferrably).
  • I've written tests to cover the new code and functionality included in this PR.
  • I've read, agree to, and signed the Contributor License Agreement (CLA).

PR Summary

Apple added in the sdk for iOS 11 a new property in ScrollViews that causes automatic inset adjustment by default (https://developer.apple.com/videos/play/wwdc2017/204/). This PR pretends to disable this property to avoid an extra space in the inverted tableView.

Related Issues

Fixes #630

… in the bottom due to automatic content inset adjustment.
@dzenbot
Copy link

dzenbot commented Sep 29, 2017

What about automaticallyAdjustsScrollViewInsets. Didn’t fix it on iOS11?

@josepbordesjove
Copy link
Contributor Author

@dzenbot No... the problem here is because of a new property apple add to scrollViews, and it only affects iOS 11.

captura_de_pantalla_2017-09-28_a_les_17 31 39_720

@kushak
Copy link

kushak commented Sep 30, 2017

Update tag -> 1.9.6 pls

@josepbordesjove
Copy link
Contributor Author

@kushak Today I'll update the tag!

Copy link

@cornr cornr left a comment

Choose a reason for hiding this comment

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

Setting the insetAdjustmentBehavior to never works and solves the issue.
But I would rather put the code into the TableView setup method:
- (UITableView *)tableViewWithStyle:(UITableViewStyle)style

@josepbordesjove
Copy link
Contributor Author

@kushak I added the tag 1.9.6 and @cornr I changed the place where the insets were adjusted, thank you.

@@ -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.

@josepbordesjove
Copy link
Contributor Author

@cornr Sorry, I forgot about it... Solved!

Copy link

@cornr cornr left a comment

Choose a reason for hiding this comment

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

Solves the problem.

@dzenbot
Copy link

dzenbot commented Oct 26, 2017

Let's merge this in. Thank you @josepbordesjove!

@dzenbot dzenbot merged commit d5e01fc into slackhq:master Oct 26, 2017
@yarodevuci
Copy link

Where do we put that??

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants