Post

Replies

Boosts

Views

Activity

Reply to Visualisation Revisited playground
You haven't shown the errors messages. Show what you've tried, what you expected to happen, what actually happened. Please post code as text (formatted as a code block), it makes it easier for us to quote later - screenshots are only useful for graphics. From the screenshot "makePieChart" creates an instance of a PieChartView named pieChartView". Which suggests there is some code somewhere which calls makePieChart and names the resulting view, like this: let pieChartView = makePieChart() "PieChartView has one property named wedges, an array of PieWedgeInstances. Assign an array pieChartView.wedges = [ PieWedge(proportion: 3, color: .black, scale: 0.5, offset: 0.5), PieWedge(proportion: 3, color: .black, scale: 0.5, offset: 0.5), PieWedge(proportion: 3, color: .red) ] or use the append method of Array to add them one at a time pieChartView.wedges.append(PieWedge(proportion: 3, color: .black, scale: 0.5, offset: 0.5)) pieChartView.wedges.append(PieWedge(proportion: 3, color: .black, scale: 0.5, offset: 0.5)) pieChartView.wedges.append(PieWedge(proportion: 3, color: .red) I hope this helps. Stick at it!
Topic: Programming Languages SubTopic: Swift Tags:
Feb ’23
Reply to XCode 14.2 randomly crashes often since update to Ventura
If Xcode itself is crashing, file a bug, this will tell you how. https://developer.apple.com/bug-reporting/ If your program is crashing, and you want help on this forum, you'll want to post relevant code samples, after you've gone some way to investigate the problem yourself. Start here. https://developer.apple.com/documentation/xcode/diagnosing-and-resolving-bugs-in-your-running-app
Jan ’23