-
-
Notifications
You must be signed in to change notification settings - Fork 684
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
Add scroll_to_top/bottom for MultilineTextInput on iOS #1876
Comments
I can pick this up. As it will be my first contribution to an open source project can you please help me? I have setup a dev environment and replaced the code snippet. Thanks, |
@kunalvirk I'll try.
When we know that it is working, we can go ahead with the pull request. Have you some experience with |
Thanks for the revert. I will follow the steps that you have mentioned and update here soon. Thanks again, |
Hi, So I tried setting up a basic iOS app with MultilineTextInput example and ran it with xcode. The "Go to top" and "Go to bottom" buttons are not working. P.S. : For toga, I cloned and edited the file as you have mentioned and installed that using |
It's hard to judge from this screenshot what is actually going wrong. |
Oops my bad. I made a mistake while building this. Now it is throwing an error in importing This is how the
And this is what I get in console after the build
|
Well... yes - because |
It's me to blame; if I remember correctly, I derived these methods from this SO question. And seeing that there are a number of @kunalvirk So, can you try |
Yes I tried it with Then I updated the scroll methods like below after importing it from
This actually worked. |
Great! Next thing to do is to write a file I don't think that we need to supply a test. It is already implemented for the other platforms. We'll see when doing the PR. Have a look here: https://toga.readthedocs.io/en/stable/how-to/contribute-code.html , if necessary, and then you can file the PR! |
I have opened a PR, please review #1929. |
Solved with merging #1929. |
Thanks @MarkusPiotrowski for the support. |
What is the problem or limitation you are having?
With PR #1728 I added
scroll_to_top
andscroll_to_bottom
functions for theMultilineTextInput
widget for Windows, macOS, Linux and Android.Possibly, I found an implementation for iOS also, unfortunately, due to hardware limitations, I'm not able to test this by myself. I'd be happy if someone would pick this up, test it and file a PR.
In
toga/iOS/src/toga_iOS/widgets/multilinetextinput.py
replace thescroll_to_bottom()
/scroll_to_top()
functions with the following code and importNSRange
from toga_iOS.libs:You can use the MultilineTextInput example for testing.
Describe the solution you'd like
Implementation of
scroll_to_bottom()
/scroll_to_top()
forMultilineTextInput
on the iOS platform.Describe alternatives you've considered
I'd also be happy to do the PR myself, as soon as I know that the code is working as intended.
Additional context
No response
The text was updated successfully, but these errors were encountered: