I am working through an Apple Developer SwiftUI Landmarks Tutorial using Xcode 16.2 on a M2 Pro Mac mini with OSX 14.7 (Sonoma).
Under Drawing paths and Shapes, the step where they draw the background, the linearGradient is not filling the top and bottom of the hex shape. If I use a solid fill the shape is filled. I've attached a screenshot from the tutorial showing the entire shape filled with the linear gradient, a screen shot from Xcode showing the gradient not filling the top and bottom of the shape and a screen shot from Xcode showing that a solid fill does work.
I found one online mention that implies that this started when the author upgraded to Xcode 16. Since the tutorial was written for Xcode 15, I assume that it worked there.
Thanks for pointing out this problem. I downloaded a copy of the tutorial and was able to reproduce the problem you have described here.
Our engineering teams need to investigate this issue, as resolution may involve changes to Apple's software. Please file a bug report, include a reference to the Xcode tutorial with the step you're on, and post the FB number here once you do.
Bug Reporting: How and Why? has tips on creating your bug report.