Repository navigation
Breaking changes
- Requires iOS 17 / macOS 14 and Swift 6 (was iOS 14 / macOS 11).
RouletteModeluses the@Observablemacro instead ofObservableObject. Hold it with@Stateand observemodel.statedirectly.Content.customtakes a@Sendable () -> AnyViewclosure instead of anAnyView.- The default layout changed: labels are anchored at the rim, arranged radially, and the wheel has a hub. Apply
.rouletteStyle(.pie)to get the 1.x appearance back.
New
RouletteStyleand.rouletteStyle(_:)control label position, label orientation, and the hub size.RouletteModel.stop(at:additionalTurns:)stops the roulette at an angle you choose. Call it insidewithAnimationto animate the wheel to that angle.
Fixed
stop()now decides a winner when the part under the pointer is wider than 270°. Before, the roulette stayed in the running state.
Known issue
- Calling
start()right afterstop()orstop(at:), without yielding in between, leaves the roulette stopped (#54).
What's Changed
- Fix CI: replace retired macos-12 runner and modernize workflow by @fummicc1 in #50
- Add RouletteStyle and make the roulette-like layout the default by @fummicc1 in #51
- Modernize codebase for iOS 17+ / macOS 14+ with Swift 6 by @fummicc1 in #49
- Anchor radial labels at the rim and guard against overflow by @fummicc1 in #52
- Add stop(at:additionalTurns:) to stop the roulette at a chosen angle by @fummicc1 in #53
Full Changelog: 1.3.2...2.0.0