Your Second iOS and SwiftUI App · Task Priority Modeling | raywenderlich.com


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/5662524-your-second-ios-and-swiftui-app/lessons/24

Is there any reason, why not use priority as a property for Task instead of creating using PrioritizedTasks.

Because SwiftUI requires a RandomAccessCollection for List/ForEach, it would have been redundant and more complex to keep such a collection updated, for each priority/section.

I agree that it’s not ideal data modeling, but I also didn’t feel like addressing the above was appropriate for a beginner-level course. Hopefully next year we get better built-in support for bound collections!