[Liquid Glass]: Buttons#115
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0153bfe8d8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| /// A Boolean value indicating whether the button is pressed. | ||
| public private(set) var isPressed: Bool = false { | ||
| didSet { | ||
| guard self.model.isTapAnimationEnabled else { return } |
There was a problem hiding this comment.
Reset the press transform when the button becomes noninteractive
If the tap action synchronously sets model.isLoading = true or disables the button, touchesEnded runs action() before the deferred isPressed = false; at that point isTapAnimationEnabled is false, so this guard skips the animation back to .identity and leaves the UIKit button permanently scaled down. This affects the common “tap, then show loading state” path for solid/blur buttons, so the reset path should still clear the transform even when the new model is noninteractive.
Useful? React with 👍 / 👎.
No description provided.