Post

Replies

Boosts

Views

Created

Variable modification in forEach
Hi! I'm trying to do a forEach loop on an array of objects. Here's my code : ForEach($individus) { $individu in if individu.reussite == true { individu.score -= 10 } else { individu.score = (individu.levees * 10) + 20 + individu.score } } I have an error on the code in the 'if' saying that "Type '()' cannot conform to 'View'", but I have no idea on how solving this problem.
Topic: UI Frameworks SubTopic: SwiftUI
2
0
270
Jan ’25
Variable modification in forEach
Hi! I'm trying to do a forEach loop on an array of objects. Here's my code : ForEach($individus) { $individu in if individu.reussite == true { individu.score -= 10 } else { individu.score = (individu.levees * 10) + 20 + individu.score } } I have an error on the code in the 'if' saying that "Type '()' cannot conform to 'View'", but I have no idea on how solving this problem.
Topic: UI Frameworks SubTopic: SwiftUI
Replies
2
Boosts
0
Views
270
Activity
Jan ’25
Too big “CorrSpotlight” folder
In the Metadata folder in my Library, a folder, called CoreSpotlight uses 230GB of storage. That’s a lot, and I’m wondering how to reduce this number. I’m on a MacBook Air M3 2024, in Beta 18.0. Thank you
Replies
0
Boosts
0
Views
471
Activity
Aug ’24