Skip to content

2.0.0

Latest

Choose a tag to compare

@fummicc1 fummicc1 released this 24 Nov 17:42
2244420

Breaking changes

  • Requires iOS 17 / macOS 14 and Swift 6 (was iOS 14 / macOS 11).
  • RouletteModel uses the @Observable macro instead of ObservableObject. Hold it with @State and observe model.state directly.
  • Content.custom takes a @Sendable () -> AnyView closure instead of an AnyView.
  • 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

  • RouletteStyle and .rouletteStyle(_:) control label position, label orientation, and the hub size.
  • RouletteModel.stop(at:additionalTurns:) stops the roulette at an angle you choose. Call it inside withAnimation to 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 after stop() or stop(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