1
1
mirror of https://github.com/exyte/Macaw.git synced 2024-09-17 16:07:44 +03:00

Handling clear background color case

This commit is contained in:
Viktor Sukochev 2017-07-03 19:11:26 +07:00
parent 2f3cd2a410
commit 1369aa2617

View File

@ -124,8 +124,10 @@ open class MacawView: UIView, UIGestureRecognizerDelegate {
override open func draw(_ rect: CGRect) {
let ctx = UIGraphicsGetCurrentContext()
ctx?.setFillColor(self.backgroundColor?.cgColor ?? UIColor.clear.cgColor)
ctx?.fill(rect)
if self.backgroundColor == nil {
ctx?.fill(rect)
}
self.context.cgContext = ctx
renderer?.render(force: false, opacity: node.opacity)