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

[fix] redraw RoughUIView when the options are changed #2

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

Conversation

Mas0nSun
Copy link

@Mas0nSun Mas0nSun commented Feb 12, 2023

Hi, I find an issue when using RoughSwift, but I‘m not sure if it‘s a bug.
Then I submitted the PR to fix it. Please review the code to see if it is reasonable.

The issue is when I use the @State to update some values in the options of RoughView, but the RoughView does not refresh. So I added the update function to didSet in the options. Because I have to figure out if the old options are equal to the new options. So I made the Options to confirm the Hashable protocol.

Here is the video after the code is updated:

Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-02-12.at.22.19.43.mp4

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.

1 participant