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

[SR-9783] Playground live view doesn't render radial CAGradientLayer correctly #61

Open
swift-ci opened this issue Jan 28, 2019 · 2 comments

Comments

@swift-ci
Copy link

Previous ID SR-9783
Radar None
Original Reporter kerrmarin (JIRA User)
Type Bug

Attachment: Download

Environment

2018 13" macbook pro, OSX Mojave 10.14.3 (18D42)

Xcode Version 10.1 (10B61)

Additional Detail from JIRA
Votes 0
Component/s Xcode Playground Support
Labels Bug
Assignee None
Priority Medium

md5: bc7fb19603f6a839c3e7f241cf714cb9

Issue Description:

With a simple playground showing a radial gradient, playgrounds doesn't display the correct gradient (see attached screenshot)

import UIKit
import PlaygroundSupport
let colors: [UIColor] = [.blue, .orange]
let view = UIView(frame: CGRect(origin: .zero, size: CGSize(width: 300, height: 300)))
view.backgroundColor = .white
let gradientLayer = CAGradientLayer()
gradientLayer.frame = view.bounds
gradientLayer.colors = colors.map { $0.cgColor }
gradientLayer.type = .radial
view.layer.addSublayer(gradientLayer)
// Present the view controller in the Live View window
PlaygroundPage.current.liveView = view

Expected:

The live view will show the correct gradient

Actual:
A weird visual artifact (correct colours but not the gradient)

@belkadan
Copy link

cc cwakamo (JIRA User)

@swift-ci
Copy link
Author

Comment by Kerr Marin Miller (JIRA)

I can still reproduce this with Xcode 13.3

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from swiftlang/swift May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants