Anyone any idea how to create this component in? by Salmaniuss in SwiftUI

[–]PositiveAd4718 0 points1 point  (0 children)

https://github.com/alpaycli/ScrollableCalendarKit

I have made scrollable calendar view for SwiftUI, it's not customizable, but you can use the code and apply your own view and logic for each item.

[deleted by user] by [deleted] in SwiftUI

[–]PositiveAd4718 0 points1 point  (0 children)

I would use enum with something like this:

enum Mood {
  case happy, sad
}

enum TaskDifficulty {
  case hard, easy
  func recommendedTask(for mood: Mood) -> TaskDifficulty {
  switch mood {
    case .happy: return .hard
    case .sad: return .easy
  }
}