Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input is too high when chat is presented in UITabBarController #28

Closed
mpodeszwa opened this issue Oct 3, 2019 · 19 comments
Closed

Input is too high when chat is presented in UITabBarController #28

mpodeszwa opened this issue Oct 3, 2019 · 19 comments
Labels
🐞 Bug An issue or PR related to a bug

Comments

@mpodeszwa
Copy link
Contributor

mpodeszwa commented Oct 3, 2019

What did you do?

I present Chat inside UITabBarController

What did you expect to happen?

Input is right above keyboard

What happened instead?

Input is offset from the keyboard (probably by tabbar's height)

Additional context

Device: Iphone 11

I created branch to show the problem:
https://github.com/mpodeszwa/stream-chat-swift/tree/bugfix/tab-input-offset

Simulator Screen Shot - iPhone 11 Pro Max - 2019-10-03 at 12 56 34

@buh
Copy link
Contributor

buh commented Oct 3, 2019

Thanks! I'll check.

@buh buh added the 🐞 Bug An issue or PR related to a bug label Oct 3, 2019
@Spenser
Copy link

Spenser commented Oct 21, 2019

We are also experiencing this as well

@buh
Copy link
Contributor

buh commented Oct 21, 2019

Hi guys, it should be fixed in the last release.
Let me know if it still there.

@buh buh closed this as completed Oct 21, 2019
@mpodeszwa
Copy link
Contributor Author

Hi @buh ,
It's almost fixed :) It works if tab bar is translucent, but if this flag is turned off then problem is still there. I rebased my branch, you can check it out https://github.com/mpodeszwa/stream-chat-swift/tree/bugfix/tab-input-offset

@buh buh reopened this Oct 30, 2019
@buh
Copy link
Contributor

buh commented Oct 31, 2019

Fixed in the next version 1.4.0.

@buh buh closed this as completed Oct 31, 2019
@mpodeszwa
Copy link
Contributor Author

Hi @buh ,
I checked out master and unfortunately I don't think it's completely fixed.
This is how chat looks without the tab bar:
without tab
And with the tab bar:
with tab

I was testing on iPhone 11 Pro Max. I rebased my branch again https://github.com/mpodeszwa/stream-chat-swift/tree/bugfix/tab-input-offset 😄

@mpodeszwa
Copy link
Contributor Author

Hi @buh
After fixing #36 this bug reappeared 😭 #36 is now fixed :)

@mpodeszwa
Copy link
Contributor Author

@buh
Copy link
Contributor

buh commented Nov 27, 2019

That's weird. Thanks! I'll check

@buh
Copy link
Contributor

buh commented Nov 27, 2019

@mpodeszwa Do you mean #36 was fixed and #28 was not?

@buh buh reopened this Nov 27, 2019
@mpodeszwa
Copy link
Contributor Author

mpodeszwa commented Nov 27, 2019

I thought in 1.5.0 #28 was fine and #36 appeared and now in 1.5.1 it's the opposite. To be honest I'm not 100% sure now if #28 was fixed earlier 🤔

@buh
Copy link
Contributor

buh commented Nov 27, 2019

It was fixed, I used some hack to save additional offset with tabbar height.
But anyway one of our customer has another bug, that I couldn't reproduce and it was really annoying to fix. So, I decide to rewrite the ComposerView position in a new way. It's much more simple and easy to manage. I'm checking why it doesn't work for you.

@buh
Copy link
Contributor

buh commented Nov 27, 2019

It's fixed v.1.5.3
Your ChatViewController should be embedded properly. The parent view controller at least should have correct safeAreaInsets.

I recommend you to use UIContainerView to embed it properly. Here is my example that works:
Screenshot 2019-11-27 at 15 20 47

@buh buh closed this as completed Nov 27, 2019
@mpodeszwa
Copy link
Contributor Author

Hi @buh
Unfortunately it doesn't work for me. I tried using UIContainerView but it's still the same. Can you check out this branch?
https://github.com/mpodeszwa/stream-chat-swift/tree/bugfix/tab-input-offset

@buh
Copy link
Contributor

buh commented Nov 27, 2019

Can't make a commit in your fork.
Please update Main.storyboard with this:
Main.storyboard.zip

@mpodeszwa
Copy link
Contributor Author

Thanks for quick response, I downloaded your storyboard and it works, but only with translucent tab bar. If I turn this flag off, the input goes higher :/ I can't really turn on translucent tab bar on my app, because it doesn't go well with our designs :(
Screenshot 2019-11-27 at 19 46 17
Simulator Screen Shot - iPhone 8 Plus (iOS 11 4) - 2019-11-27 at 19 46 37

I checked on iPhone 8 Plus with iOS 11.4

@buh
Copy link
Contributor

buh commented Nov 27, 2019

@mpodeszwa ok I’ll think how to fix it

@buh buh reopened this Nov 27, 2019
@buh
Copy link
Contributor

buh commented Nov 28, 2019

Please check master with the fix.

@buh buh closed this as completed Nov 28, 2019
@mpodeszwa
Copy link
Contributor Author

Awesome, works great now :) Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug An issue or PR related to a bug
Projects
None yet
Development

No branches or pull requests

3 participants