Skip to content

Commit

Permalink
Merge pull request #4 from RosenDev/master
Browse files Browse the repository at this point in the history
Add support for macOS
  • Loading branch information
sameersyd authored Jun 18, 2021
2 parents 50eb0d6 + b9570e2 commit 3117d33
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Sources/FortuneWheel/FortuneWheel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import SwiftUI

@available(macOS 11.0, *)
@available(iOS 14.0, *)
public struct FortuneWheel: View {

Expand Down Expand Up @@ -57,6 +58,7 @@ public struct FortuneWheel: View {
}
}

@available(macOS 10.15, *)
@available(iOS 13.0, *)
extension Color {

Expand Down
1 change: 1 addition & 0 deletions Sources/FortuneWheel/FortuneWheelViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import SwiftUI

@available(macOS 10.15, *)
@available(iOS 13.0, *)
class FortuneWheelViewModel: ObservableObject {

Expand Down
1 change: 1 addition & 0 deletions Sources/FortuneWheel/SpinWheel/SpinWheelCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import SwiftUI

@available(macOS 10.15, *)
@available(iOS 13.0, *)
struct SpinWheelCell: Shape {

Expand Down
6 changes: 6 additions & 0 deletions Sources/FortuneWheel/SpinWheel/SpinWheelView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import SwiftUI

@available(macOS 10.15, *)
@available(iOS 13.0, *)
struct Triangle: Shape {
public func path(in rect: CGRect) -> Path {
Expand All @@ -20,6 +21,7 @@ struct Triangle: Shape {
}
}

@available(macOS 10.15, *)
@available(iOS 13.0, *)
struct SpinWheelPointer: View {
var pointerColor: Color
Expand All @@ -31,6 +33,7 @@ struct SpinWheelPointer: View {
}
}

@available(macOS 10.15, *)
@available(iOS 13.0, *)
struct SpinWheelBolt: View {
var body: some View {
Expand All @@ -44,19 +47,22 @@ struct SpinWheelBolt: View {
}
}

@available(macOS 10.15, *)
@available(iOS 13.0, *)
struct SpinWheelView: View {

var data: [Double], labels: [String]

private let colors: [Color]
private let sliceOffset: Double = -.pi / 2
@available(macOS 10.15, *)

init(data: [Double], labels: [String], colors: [Color]) {
self.data = data
self.labels = labels
self.colors = colors
}
@available(macOS 10.15.0, *)

var body: some View {
GeometryReader { geo in
Expand Down
2 changes: 1 addition & 1 deletion Tests/FortuneWheelTests/FortuneWheelTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ final class FortuneWheelTests: XCTestCase {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct
// results.
XCTAssertEqual(FortuneWheel().text, "Hello, World!")
XCTAssertEqual(FortuneWheel(titles: [], size: 200, onSpinEnd: {_ in}).text, "Hello, World!")
}

static var allTests = [
Expand Down

0 comments on commit 3117d33

Please sign in to comment.