We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
can you please add a way to to change the color and the width of the signature dynamically for the same signature.
The text was updated successfully, but these errors were encountered:
@ouberghouz I found a solution. Here is an explanation how "userInterfaceStyle" works and how to prevent it https://stackoverflow.com/questions/58501913/get-image-of-pkdrawing-in-light-mode
As a solution, you can try this
import PencilKit extension PKDrawing { func image(from rect: CGRect, scale: CGFloat, userInterfaceStyle: UIUserInterfaceStyle) -> UIImage { let currentTraits = UITraitCollection.current UITraitCollection.current = UITraitCollection(userInterfaceStyle: .light) // Here the magic. Try .dark or .light let image = self.image(from: rect, scale: scale) UITraitCollection.current = currentTraits return image } }
Sorry, something went wrong.
No branches or pull requests
can you please add a way to to change the color and the width of the signature dynamically for the same signature.
The text was updated successfully, but these errors were encountered: