Ian Hirschfeld
Aug 28, 2017 · 1 min read

Thanks! If you want to change the starting angle you can use a transform on the gradient layer. For example, to rotate by 90 degrees:

let angle: CGFloat = CGFloat(90.0 / 180.0 * Double.pi)
let t = CATransform3DMakeRotation(angle, 0, 0, 1)
gradientLayer.transform = t

)

    Ian Hirschfeld

    Written by

    VR Consultant and Software Engineer at @unity3d. Making things with @SoapCollective. Curator for @hackdesign. Office hours: https://calendly.com/ianhirschfeld

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade