Skip to content

Set alpha when disabling button - #15

Merged
TimOliver merged 1 commit into
TimOliver:masterfrom
natanrolnik:patch-1
May 15, 2019
Merged

Set alpha when disabling button#15
TimOliver merged 1 commit into
TimOliver:masterfrom
natanrolnik:patch-1

Conversation

@natanrolnik

Copy link
Copy Markdown
Contributor

I noticed that calling the roundedButton.isEnabled = false doesn't dim it - which is the case in other UIControls.

I noticed that in all setters _isDirty = YES; [self setNeedsLayout]; are called, and thought about using the same pattern; however, there is no need to layout all the subviews again, so I thought setting alpha directly a more reasonable solution.

@TimOliver

Copy link
Copy Markdown
Owner

Aha. I didn't even think about the enabled state. Thanks so much for that!

@TimOliver
TimOliver merged commit aeb2afa into TimOliver:master May 15, 2019
@natanrolnik

Copy link
Copy Markdown
Contributor Author

🙌🏻

Sent with GitHawk

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