Driving me nuts… I have a class called TrackPiece2 with a bunch of var’s in it… I have an array of these and I want to change a value in each TrackPiece2 of the array…
but I am getting the error “Type ‘()’ cannot conform to ‘AccessibilityRotorContent’” on the ForEach line of func changeZoom below
` class TrackLayout2 {
var trackPieces: [TrackPiece2] = []
var drawOuterLines: Bool = false
func addTrackPiece(newTrkPc: TrackPiece2) {
self.trackPieces.append(newTrkPc)
}
func changeZoom(newZoom: CGFloat) {
ForEach(trackPieces) {
trkPc in
trkPc.zoom = newZoom
}
}
func loadTrackPieces() {
let centerPoint = CGPoint(x: 160, y:160)
addTrackPiece(newTrkPc: TrackPiece2(centerPnt: centerPoint, radius: 160.0, width: 10.0, startAngle: Angle(degrees: 0), angleArc: Angle(degrees: 45), color: Color.pink, zoom: 0.5))
}
} `
Thanks for any advice/help… TJ