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

Added auto-deselection for buttons after 0.1s to mimic default behavior #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

siema
Copy link

@siema siema commented Jul 23, 2017

Right now, with dismissOnAction set to false, the buttons get stuck with their highlight after touching. This is due to the workaround for UITableView touch delay by manually selecting them, but never deselecting.
This fix adds auto deselection for them after 0.1s.

@Friend-LGA
Copy link
Owner

Which default behaviour do you want to mimic? IIRC default alert view will be always disappear after pressing any button? I think I had gave you all control over LGAlertView: you can use blocks, delegates or notifications to catch the action, and add this auto-deselection specifically for your case.

Also if you use dispatch_after it is better to use weak reference to the sender.
And what will happen if I start pressing the same button very fast many times in a row? Is it predictable behaviour? I think we can get some broken state of button at some point, and it is better to add some statements to prevent it.

@housecode
Copy link

When this update will be merged with master and available at cocoapods update ?

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.

None yet

3 participants