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

First cell appears behind the textInputBar instead of above it #334

Closed briankracoff closed 8 years ago

briankracoff commented 8 years ago

The first UITableViewCell in the UITableView is behind the textInputBar when the UIViewController appears instead of having a top content inset greater than 0. It will only fix itself when I tap on the textView (bringing up the keyboard) and then tap off of it (dismissing the keyboard).

This is after upgrading from v1.7.2 to v1.8. I bisected around and looks like https://github.com/slackhq/SlackTextViewController/commit/3ce0f7bf57c62989e00ae156fff925736cb9c16d breaks it.

dzenbot commented 8 years ago

Thanks. Will look into it.

briankracoff commented 8 years ago

Found out what's going on. I was adding a UIRefreshControl to the UITableView to the top as usual (which will put it at the bottom since inverted == true).

However, I called refreshControl.beginRefreshing() in viewDidLoad so it'll show as refreshing when the user comes into the screen. I'm guessing UIRefreshControl does some contentInset changes that messes with the contentInset changes that you guys do.

Moving refreshControl.beginRefreshing() to viewDidAppear fixes the issue.

Feel free to close if this is too specific of a bug.

dzenbot commented 8 years ago

Thanks for the heads up! :+1: