slackhq / SlackTextViewController

⛔️**DEPRECATED** ⛔️ A drop-in UIViewController subclass with a growing text input view and other useful messaging features
https://slack.com/
MIT License
8.32k stars 1.08k forks source link

use interactivePopGestureRecognizer in SlackTextViewController have a gap under in the viewcontroller #625

Closed ghost closed 7 years ago

ghost commented 7 years ago

i use code self.navigationController.interactivePopGestureRecognizer.delegate for slide Back To main home page but It's a gap under in viewcontroller, How to fix textview?

dzenbot commented 7 years ago

In order to help you, please fill in the PR form + repro steps. If not, I will need to close this as incomplete report.

bogren commented 7 years ago

This is a problem with iOS 11. We solved this in our project for all table- and collection view controllers with the code below. automaticallyAdjustsScrollViewInsets is deprecated in iOS 11. I have to try the sample project before I send a PR.

if (@available(iOS 11.0, *)) {
    self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
} else {
    self.automaticallyAdjustsScrollViewInsets = NO;
}
ghost commented 7 years ago

Untitled16a57252fdc47a0f.png

@dzenbot OK i'm so sorry not post step.

Step Home Menu Use Tableview click Cell Go to DetailViewController click textview SlackTextViewController and scroll detail to up and slide Gesture Left to right but It's a gap under in ViewController the SlackTextViewController use on subview

Gif Steps ezgif.com-video-to-gif.gif

ghost commented 7 years ago

@bogren i try to use code is not work.

ghost commented 7 years ago

@dzenbot @bogren Thank for help me , i can fix issues in post Use Code

-(void)viewWillDisappear:(BOOL)animated { [self.textView resignFirstResponder]; [super viewWillDisappear:animated]; if (@available(iOS 11.0, *)) { self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; } else { self.automaticallyAdjustsScrollViewInsets = NO; } }

dzenbot commented 7 years ago

Good to know you were able to fix it on your end.