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

Black screen on touch #34

Open
ppamorim opened this issue Mar 27, 2020 · 1 comment
Open

Black screen on touch #34

ppamorim opened this issue Mar 27, 2020 · 1 comment

Comments

@ppamorim
Copy link
Contributor

Hi, I am getting a black screen when I touch in the component, the code is very simple like below:

class FooViewController: UIViewController {

  private lazy var signatureView: SwiftSignatureView = {
    let signatureView: SwiftSignatureView = SwiftSignatureView()
//    signatureView.translatesAutoresizingMaskIntoConstraints = false //Used for constraints, same problem
    return signatureView
  }()

  override func loadView() {
    super.loadView()
    view.addSubview(signatureView)
  }

  override func viewDidLayoutSubviews() {
    super.viewDidLayoutSubviews()
    self.signatureView.frame = self.view.frame //The same happens with contraints
  }

}
@ppamorim
Copy link
Contributor Author

ppamorim commented Mar 27, 2020

The problem is that window?.overrideUserInterfaceStyle is making the SwiftSignatureView background gets black. So everything is black.
The workaround is to set self.signatureView.backgroundColor = UIColor.white.

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

1 participant