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

UITextField return command #118

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

AndrewMcDrew
Copy link

Added a command for the Return key.

Unfortunately I have no experience with Quick system at all. I've diligently copied UIButton test's implementation but have no idea regarding is it working or not.


if (command == nil) return;

disposable = [command.enabled setKeyPath:@keypath(self.enabled) onObject:self];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs a -asScopedDisposable in order to not leak when the UITextField is deallocated.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neither UIBarButtonItem (RACCommandSupport) nor UIButton (RACCommandSupport) make use of RACScopedDisposable in the same case. Do you think all of them should be revised to address this problem?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would think so, but I'm honestly not sure. I'm not very familiar with this code.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me too) So I should investigate more into this possible memory leak but can't do it right now. Will try to look at this soon.

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

Successfully merging this pull request may close these issues.

2 participants