Swiftpack.co - Package - zanew/DayOfWeekCollectionView

DayOfWeekCollectionView

A simple UI component for controlling which days of the week a thing is active on.

Installation

Swift Package Manager

In Xcode got to File -> Swift Packages -> Add Package Dependency and paste in the repo's url: https://github.com/zanew/DayOfWeekCollectionView

Usage

The control is backed by an OptionSet.

Example:

let activeDays = DaysOfWeekActive.weekdaysOnly
let weekCollectionView = DayOfWeekCollectionView(activeDays: activeDays)

picker.activeDays = [.saturday, .sunday]

Styling

weekCollectionView.backgroundColor = .secondarySystemGroupedBackground
weekCollectionView.badgeSelectionColor = .systemOrange

Github

link
Stars: 1

Dependencies

Used By

Total: 0