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

Background color is not changing from white #46

Open
gyounes93 opened this issue Oct 27, 2020 · 2 comments
Open

Background color is not changing from white #46

gyounes93 opened this issue Oct 27, 2020 · 2 comments

Comments

@gyounes93
Copy link

Hi,

I've been using SwiftSignatureView for a few months now and everything has been great. Recently, I've been working on a revamp of my application and when I go to use SwiftSignatureView, the background color is not changing to whatever I set it to (in the IB).

I've even tried changing the settings of the SwiftSignatureView (view) programmatically and it still doesn't hold.

Using XCode 12.1 and iOS 13.4 (also tried iOS 14.1). Let me know if anyone has any ideas why this is..

Thank you!

@yogeshmakwanavolansys
Copy link

You can set background color using the below code

import PencilKit
`
if let signaturInnerView = viewSignature.subviews.first(where: {$0 is ISignatureView}) {
if let canvasView = signaturInnerView.subviews.first(where: {$0 is PKCanvasView}) {
canvasView.backgroundColor = UIColor.red
}
}

`

// viewSignature is object of the SwiftSignatureView

@AndreiBoariu
Copy link

@yogeshmakwanavolansys above solution works perfectly for UI, but i need that background color to be attached to image when exported. Any solution for this ?

Appreciate !

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

No branches or pull requests

3 participants