draw(_ rect:CGRect) is not updating Playground Assistant editor preview

65 views Asked by At

I tried different code in draw implementation. From custom UIBezierPath to simply changing background colour to random. Results are successfully updated in preview, which is shown under the line on clicking "Show Results" button. But nothing happens to assistant editor timeline view.

Here is my draw override

override func draw(_ rect: CGRect) {
    self.backgroundColor = UIColor(red: CGFloat(arc4random()) / CGFloat(UInt32.max), green: CGFloat(arc4random()) / CGFloat(UInt32.max), blue: CGFloat(arc4random()) / CGFloat(UInt32.max), alpha: 1)
    super.draw(rect)
}

UPD: liveView is assigned properly. It shows but is shows only first result of draw.

0

There are 0 answers