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

Not working on os11 ? #22

Closed
justdan0227 opened this issue Dec 11, 2017 · 7 comments
Closed

Not working on os11 ? #22

justdan0227 opened this issue Dec 11, 2017 · 7 comments

Comments

@justdan0227
Copy link

justdan0227 commented Dec 11, 2017

Just copied the source into my project, dropped a textview onto my viewcontroller, changed the class to GrowingTextView and when I run, the keyboard overlays the textview?

So in my case I have a tableview and want to add this at the bottom. I created a view, dropped a textview in it (just as in the example 2). What I don't understand is how this resizes the tableview while the keyboard is open?

@justdan0227
Copy link
Author

So I "got this working" in the example adding a tableview to Example 2. However in the example it ties the constraint to the BottomLayout which is now deprecated and we are told to use safe area. How does this get updated to use save area of xCode 9.2 vs the BottomLayout ?

@KennethTsang
Copy link
Owner

I have update all 3 examples with new auto layout implementation. You may take a look.

@justdan0227
Copy link
Author

AWESOME! thanks.. looking it over now.. Constraints are "great" but boy in IB they are so confusing.

@justdan0227
Copy link
Author

That appears to work.. Can you add and example 2b which would put a table view above the control. I'm attempting to do that and not sure if it all needs to be in a view and where the bottom contraint would be such that the tableview would resize and textview move up when keyboard is shown

@KennethTsang
Copy link
Owner

Add a constraint that make your tableview's bottom equals to toolbar's top, then it should works.

@justdan0227
Copy link
Author

Wow that "appears" to work however. I took Example2 and simply added a tableview before the inputtoolbar and it appears to work just fine without messing with the constraint? 1 final thing; how can I scroll to the bottom of the list when the growingtext appears? Is there a delegate method that gets called by growing text?

@KennethTsang
Copy link
Owner

Are you sure it is working? I think you have to add constraint for that. Anyway, regarding your question, what do u mean "when the growingtext appears"? I guess you are talking about "keyboard appears", right? You need to implement keyboard observer in your ViewController (like Example2), then you may call tableView.scrollToRow(at: indexPath, at: .bottom, animated: true) when keyboard appears.

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

No branches or pull requests

2 participants