Skip to content

Commit

Permalink
Style modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
abkslm committed Oct 26, 2023
1 parent 05902ac commit 3e3312c
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22 deletions.
2 changes: 2 additions & 0 deletions Spinner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand Down Expand Up @@ -434,6 +435,7 @@
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_VERSION = 5.0;
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand Down
1 change: 1 addition & 0 deletions Spinner/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"images" : [
{
"filename" : "spinner-AppIcon.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 15 additions & 19 deletions Spinner/LoadingRingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,22 @@ public struct LoadingRingView: View {

public var body: some View {

// ZStack {
RingView()
.onAppear() {
startAnimation.toggle()
RingView()
.onAppear() {
startAnimation.toggle()
}
.phaseAnimator(Phase.allCases, trigger: startAnimation) { content, phase in
content
.rotationEffect(phase.angle)
.scaleEffect(phase.scale)
} animation: { phase in
switch phase {
case .initial: .linear.repeatForever(autoreverses: false).speed(0.075)
case .rotate: .smooth(duration: 3.00)
case .grow: .smooth(duration: 0.50)
case .collapse: .smooth(duration: 0.10)
}
.phaseAnimator(Phase.allCases, trigger: startAnimation) { content, phase in
content
.rotationEffect(phase.angle)
.scaleEffect(phase.scale)
} animation: { phase in
switch phase {
case .initial: .linear.repeatForever(autoreverses: false).speed(0.075)
case .rotate: .smooth(duration: 3.00)
case .grow: .smooth(duration: 0.50)
case .collapse: .smooth(duration: 0.10)
}
}
// .zIndex(1)

// }
}

}

Expand Down
5 changes: 3 additions & 2 deletions Spinner/RotatingRingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
import SwiftUI

struct RotatingRingView: View {
@State var isRotating = 0.0
// @Binding var rotate = false
@State private var isRotating = 0.0

var body: some View {

RingView()
.fixedSize()
.rotationEffect(.degrees(isRotating))
Expand All @@ -22,6 +22,7 @@ struct RotatingRingView: View {
isRotating = 360.00
}
}

}
}

Expand Down
2 changes: 1 addition & 1 deletion Spinner/WinView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct WinView: View {
Text(winStatus.text)
.font(.largeTitle)
.fontWeight(/*@START_MENU_TOKEN@*/.bold/*@END_MENU_TOKEN@*/)

Button(action: setWaiting, label: {Text("Reset")})
.buttonStyle(.bordered)

Expand Down
Binary file added spinner-AppIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spinner-AppIcon.psd
Binary file not shown.

0 comments on commit 3e3312c

Please sign in to comment.