Skip to content

Commit 511d188

Browse files
Merge pull request #28 from SimformSolutionsPvtLtd/develop
Develop
2 parents 05eeef8 + f940205 commit 511d188

File tree

13 files changed

+534
-10
lines changed

13 files changed

+534
-10
lines changed

Package.swift

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
//
2+
// Package.swift
3+
// SSSwiftUIAnimations
4+
//
5+
// Created by Rahul Yadav on 11/11/24.
6+
//
7+
8+
// swift-tools-version: 6.0
9+
import PackageDescription
10+
11+
let package = Package(
12+
name: "SSSwiftUIAnimations",
13+
platforms: [
14+
.iOS(.v15) // Specify minimum platform versions
15+
],
16+
products: [
17+
// Products define the executables and libraries a package produces and makes available to clients.
18+
.library(
19+
name: "SSSwiftUIAnimations",
20+
targets: ["SSSwiftUIAnimations"]),
21+
],
22+
dependencies: [
23+
// Dependencies declare other packages that this package depends on.
24+
],
25+
targets: [
26+
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
27+
// Targets can depend on other targets in this package, and on products in packages this package depends on.
28+
.target(
29+
name: "SSSwiftUIAnimations",
30+
dependencies: [],
31+
path: "SSSwiftUIAnimations"
32+
)
33+
]
34+
)

README.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,47 @@ SwiftUI animation library to bring your app to life. ✨
2121
### ProgressView ⏳
2222
![ProgressView](https://github.com/SimformSolutionsPvtLtd/SS-iOS-Animations/blob/master/SSSwiftUIAnimations/GIFs/ProgressView.gif?raw=true)
2323

24-
[**Code Link**](https://github.com/SimformSolutionsPvtLtd/SS-iOS-Animations/tree/master/SSSwiftUIAnimations/Sources/ProgressAnimation)
24+
[**Code Link**](https://github.com/SimformSolutionsPvtLtd/SS-iOS-Animations/tree/master/SSSwiftUIAnimations/Sources/ProgressAnimation) | Animation Name: ProgressAnimation
2525

2626
### Left Right ArrowView ↔
2727
![LRArrowView](https://github.com/SimformSolutionsPvtLtd/SS-iOS-Animations/blob/master/SSSwiftUIAnimations/GIFs/LRArrowView.gif?raw=true)
2828

29-
[**Code Link**](https://github.com/SimformSolutionsPvtLtd/SS-iOS-Animations/tree/master/SSSwiftUIAnimations/Sources/ArrowLeftRightAnimation)
29+
[**Code Link**](https://github.com/SimformSolutionsPvtLtd/SS-iOS-Animations/tree/master/SSSwiftUIAnimations/Sources/ArrowLeftRightAnimation) | Animation Name: ArrowLeftRightAnimation
3030

3131
### Water Effect ProgressView 🌊
3232
![WaterEffectProgressView](https://github.com/SimformSolutionsPvtLtd/SS-iOS-Animations/blob/master/SSSwiftUIAnimations/GIFs/WaterProgressView.gif?raw=true)
3333

34-
[**Code Link**](https://github.com/SimformSolutionsPvtLtd/SS-iOS-Animations/tree/master/SSSwiftUIAnimations/Sources/WaterProgressAnimation)
34+
[**Code Link**](https://github.com/SimformSolutionsPvtLtd/SS-iOS-Animations/tree/master/SSSwiftUIAnimations/Sources/WaterProgressAnimation) | Animation Name: WaterProgressAnimation
35+
36+
## Installation
37+
**CocoaPods**
38+
39+
- You can use CocoaPods to install SSSwiftUIAnimations by adding it to your Podfile. It will add all the Animation to your project:
40+
41+
use_frameworks!
42+
pod 'SSSwiftUIAnimations'
43+
44+
- For installing only particular Animation from the Pod. Use /AnimationName at the end. You can find the AnimationName at the bottom of Animations listed above.<br/> **Example: pod 'SSSwiftUIAnimations/WaterProgressAnimation'**
45+
46+
pod 'SSSwiftUIAnimations/[AnimationName]'
47+
48+
- Then, wherever you want to use it, Just:
49+
50+
import SwiftUI
51+
import SSSwiftUIAnimations
52+
53+
**Swift Package Manager**
54+
55+
- When using Xcode 11 or later, you can install `SSSwiftUIAnimations` through [Swift Package Manager](https://swift.org/package-manager/) by going to your Project settings > `Swift Packages` and add the repository by providing the GitHub URL. Alternatively, you can go to `File` > `Swift Packages` > `Add Package Dependencies...`
56+
57+
**Manually**
58+
- Download and drop **SSSwiftUIAnimations** folder in your project.
59+
- Congratulations!
60+
61+
### Reaction Animation View 🌊
62+
![ReactionAnimationView](https://github.com/SimformSolutionsPvtLtd/SS-iOS-Animations/blob/master/SSSwiftUIAnimations/GIFs/ReactionAnimationView.gif?raw=true)
63+
64+
[**Code Link**](https://github.com/SimformSolutionsPvtLtd/SS-iOS-Animations/tree/master/SSSwiftUIAnimations/Sources/ReactionAnimation) | Animation Name: ReactionAnimation
3565

3666
## Found these animations useful? :heart:
3767

SSSwiftUIAnimations.xcodeproj/project.pbxproj

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
4636F36E291E1BD600C8DB5B /* LeftArrow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4636F36D291E1BD600C8DB5B /* LeftArrow.swift */; };
1515
469963A5290FCE3600DC01AD /* SSLRArrowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 469963A4290FCE3600DC01AD /* SSLRArrowView.swift */; };
1616
8FE1727C2CAA8BF100F8AB45 /* ViewExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FE1727A2CAA8BF100F8AB45 /* ViewExtension.swift */; };
17+
902200F62CDCC87E001DCC3A /* ReactionAnimationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 902200F52CDCC87E001DCC3A /* ReactionAnimationView.swift */; };
18+
902200F82CDCC951001DCC3A /* ReactionAnimationViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 902200F72CDCC951001DCC3A /* ReactionAnimationViewModel.swift */; };
19+
902200FA2CDCCF23001DCC3A /* ExampleReactionAnimationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 902200F92CDCCF1C001DCC3A /* ExampleReactionAnimationView.swift */; };
20+
902201062CDE116E001DCC3A /* ReactionAnimationViewStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 902201052CDE1166001DCC3A /* ReactionAnimationViewStyle.swift */; };
21+
902201082CDE2293001DCC3A /* ReactionAnimationView.gif in Resources */ = {isa = PBXBuildFile; fileRef = 902201072CDE2293001DCC3A /* ReactionAnimationView.gif */; };
1722
B10677FE2BE8D0D400957B4E /* DownArrow.swift in Sources */ = {isa = PBXBuildFile; fileRef = B10677FD2BE8D0D400957B4E /* DownArrow.swift */; };
1823
B1098E7D2BD94ED900BC19DD /* WaveView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1098E7C2BD94ED900BC19DD /* WaveView.swift */; };
1924
B11B983A2BCE9C3F00D76016 /* CheckView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B11B98392BCE9C3F00D76016 /* CheckView.swift */; };
@@ -51,7 +56,13 @@
5156
2BC2D8F928CF3A7000CAB302 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
5257
4636F36D291E1BD600C8DB5B /* LeftArrow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LeftArrow.swift; sourceTree = "<group>"; };
5358
469963A4290FCE3600DC01AD /* SSLRArrowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SSLRArrowView.swift; sourceTree = "<group>"; };
59+
8F9765232CE20D5000034CF7 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
5460
8FE1727A2CAA8BF100F8AB45 /* ViewExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewExtension.swift; sourceTree = "<group>"; };
61+
902200F52CDCC87E001DCC3A /* ReactionAnimationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReactionAnimationView.swift; sourceTree = "<group>"; };
62+
902200F72CDCC951001DCC3A /* ReactionAnimationViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReactionAnimationViewModel.swift; sourceTree = "<group>"; };
63+
902200F92CDCCF1C001DCC3A /* ExampleReactionAnimationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleReactionAnimationView.swift; sourceTree = "<group>"; };
64+
902201052CDE1166001DCC3A /* ReactionAnimationViewStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReactionAnimationViewStyle.swift; sourceTree = "<group>"; };
65+
902201072CDE2293001DCC3A /* ReactionAnimationView.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = ReactionAnimationView.gif; sourceTree = "<group>"; };
5566
B10677FD2BE8D0D400957B4E /* DownArrow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DownArrow.swift; sourceTree = "<group>"; };
5667
B1098E7C2BD94ED900BC19DD /* WaveView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WaveView.swift; sourceTree = "<group>"; };
5768
B11B98392BCE9C3F00D76016 /* CheckView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckView.swift; sourceTree = "<group>"; };
@@ -95,6 +106,7 @@
95106
2BC2D8E628CF3A6F00CAB302 = {
96107
isa = PBXGroup;
97108
children = (
109+
8F9765232CE20D5000034CF7 /* Package.swift */,
98110
2BC2D8F128CF3A6F00CAB302 /* SSSwiftUIAnimations */,
99111
2BC2D8F028CF3A6F00CAB302 /* Products */,
100112
);
@@ -151,9 +163,20 @@
151163
path = Utils;
152164
sourceTree = "<group>";
153165
};
166+
902200F42CDCC860001DCC3A /* ReactionAnimation */ = {
167+
isa = PBXGroup;
168+
children = (
169+
902201052CDE1166001DCC3A /* ReactionAnimationViewStyle.swift */,
170+
902200F52CDCC87E001DCC3A /* ReactionAnimationView.swift */,
171+
902200F72CDCC951001DCC3A /* ReactionAnimationViewModel.swift */,
172+
);
173+
path = ReactionAnimation;
174+
sourceTree = "<group>";
175+
};
154176
B1343F702C06064B009ACE90 /* GIFs */ = {
155177
isa = PBXGroup;
156178
children = (
179+
902201072CDE2293001DCC3A /* ReactionAnimationView.gif */,
157180
B1343F712C060680009ACE90 /* ProgressView.gif */,
158181
B741A1432C4A6D610083399B /* WaterProgressView.gif */,
159182
B1343F732C060686009ACE90 /* LRArrowView.gif */,
@@ -178,6 +201,7 @@
178201
B153FD112BFB64BE00AEFE83 /* Examples */ = {
179202
isa = PBXGroup;
180203
children = (
204+
902200F92CDCCF1C001DCC3A /* ExampleReactionAnimationView.swift */,
181205
B19E0B652BF7498700E65974 /* ExampleProgressView.swift */,
182206
B153FD142BFB7A7900AEFE83 /* ExampleLRArrowView.swift */,
183207
B780A9252C3D806300342512 /* ExampleWaterProgressView.swift */,
@@ -189,6 +213,7 @@
189213
B1DE99D72C060E1A006995FB /* Sources */ = {
190214
isa = PBXGroup;
191215
children = (
216+
902200F42CDCC860001DCC3A /* ReactionAnimation */,
192217
8FE1727B2CAA8BF100F8AB45 /* Utils */,
193218
B780A9162C3D05CD00342512 /* WaterProgressAnimation */,
194219
B14AB36A2BC40286004B09C4 /* ProgressAnimation */,
@@ -293,6 +318,7 @@
293318
B1EA09DE2C11A6B70024BC28 /* Banner.png in Resources */,
294319
2BC2D8F728CF3A7000CAB302 /* Assets.xcassets in Resources */,
295320
B1343F742C060686009ACE90 /* LRArrowView.gif in Resources */,
321+
902201082CDE2293001DCC3A /* ReactionAnimationView.gif in Resources */,
296322
);
297323
runOnlyForDeploymentPostprocessing = 0;
298324
};
@@ -313,6 +339,7 @@
313339
B18792612AA5A0D2006F2CC9 /* CircularView.swift in Sources */,
314340
B153FD152BFB7A7900AEFE83 /* ExampleLRArrowView.swift in Sources */,
315341
2BC2D8F528CF3A6F00CAB302 /* ContentView.swift in Sources */,
342+
902200F62CDCC87E001DCC3A /* ReactionAnimationView.swift in Sources */,
316343
4636F36E291E1BD600C8DB5B /* LeftArrow.swift in Sources */,
317344
B15FD7992C04785700752CEA /* CustomToolBar.swift in Sources */,
318345
469963A5290FCE3600DC01AD /* SSLRArrowView.swift in Sources */,
@@ -322,14 +349,17 @@
322349
B153FD132BFB71F500AEFE83 /* FilledStrokeCircle.swift in Sources */,
323350
2BC2D8F328CF3A6F00CAB302 /* SSSwiftUIAnimationsApp.swift in Sources */,
324351
B741D9A62C46448200ABFCB4 /* WaterProgressTextView.swift in Sources */,
352+
902201062CDE116E001DCC3A /* ReactionAnimationViewStyle.swift in Sources */,
325353
B780A9242C3D7A7C00342512 /* WaterCircleOutlineView.swift in Sources */,
326354
B1DFCA532BF4FC7900F01505 /* ArrowView.swift in Sources */,
327355
B780A9182C3D063500342512 /* WaterProgressView.swift in Sources */,
328356
B11B983A2BCE9C3F00D76016 /* CheckView.swift in Sources */,
357+
902200F82CDCC951001DCC3A /* ReactionAnimationViewModel.swift in Sources */,
329358
B7ECD58D2C452D8100B6A703 /* BubbleView.swift in Sources */,
330359
8FE1727C2CAA8BF100F8AB45 /* ViewExtension.swift in Sources */,
331360
B780A9262C3D806300342512 /* ExampleWaterProgressView.swift in Sources */,
332361
B780A91A2C3D0BCB00342512 /* WaterProgressViewStyle.swift in Sources */,
362+
902200FA2CDCCF23001DCC3A /* ExampleReactionAnimationView.swift in Sources */,
333363
B1DFCA512BF4FA3D00F01505 /* ProgressCircle.swift in Sources */,
334364
B14AB36C2BC41B05004B09C4 /* ProgressView.swift in Sources */,
335365
);
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
//
2+
// ExampleReactionAnimationView.swift
3+
// SSSwiftUIAnimations
4+
//
5+
// Created by Faaiz Daglawala on 07/11/24.
6+
//
7+
8+
import SwiftUI
9+
10+
struct ExampleReactionAnimationView: View {
11+
12+
// MARK: - Variables
13+
14+
var body: some View {
15+
VStack {
16+
SSReactionAnimationView(
17+
style: SSReactionAnimationViewStyle(
18+
outerCircleColor: .clear,
19+
innerCircleColor: .blue,
20+
defautHeartColor: .gray,
21+
selectedHeartColor: .red
22+
)) { isSelected in }
23+
.frame(width: 100, height: 100)
24+
}
25+
.customToolbar(title: "ReactionAnimationView Example", fontSize: 17)
26+
}
27+
28+
}
29+
30+
#Preview {
31+
ExampleReactionAnimationView()
32+
}

SSSwiftUIAnimations/Examples/ExamplesList/ExampleListModel.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,10 @@ class ExampleListModel: Identifiable {
2121
}
2222

2323
// data for example row list
24-
static let exampleList = [ExampleListModel(rowTitle: "ProgressView", destinationView: AnyView(ExampleProgressView())), ExampleListModel(rowTitle: "Arrow Left Right View", destinationView: AnyView(ExampleLRArrowView())), ExampleListModel(rowTitle: "Water Progress View", destinationView: AnyView(ExampleWaterProgressView()))]
24+
static let exampleList = [
25+
ExampleListModel(rowTitle: "ProgressView", destinationView: AnyView(ExampleProgressView())),
26+
ExampleListModel(rowTitle: "Arrow Left Right View", destinationView: AnyView(ExampleLRArrowView())),
27+
ExampleListModel(rowTitle: "Water Progress View", destinationView: AnyView(ExampleWaterProgressView())),
28+
ExampleListModel(rowTitle: "ReactionAnimaionView", destinationView: AnyView(ExampleReactionAnimationView()))
29+
]
2530
}
125 KB
Loading

SSSwiftUIAnimations/Sources/ArrowLeftRightAnimation/LRArrowAnimStyle.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import SwiftUI
99

10-
struct LRArrowAnimStyle {
10+
public struct LRArrowAnimStyle {
1111

1212
// MARK: - Variables
1313

SSSwiftUIAnimations/Sources/ArrowLeftRightAnimation/SSLRArrowView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import SwiftUI
99

10-
struct SSLRArrowView: View {
10+
public struct SSLRArrowView: View {
1111

1212
// MARK: - Variables
1313

@@ -24,7 +24,7 @@ struct SSLRArrowView: View {
2424
var rightArrowViewTap: (() -> Void)?
2525

2626
// MARK: - Body view
27-
var body: some View {
27+
public var body: some View {
2828
HStack(spacing: 20 + arrowViewAnimStyle.circleStrokeSize) {
2929

3030
// Left arrow view

SSSwiftUIAnimations/Sources/ProgressAnimation/ModelClass.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import SwiftUI
99

10-
struct SSProgressViewStyle {
10+
public struct SSProgressViewStyle {
1111
var circleSize: CGFloat
1212
var circleStrokeWidth: CGFloat
1313
var arrowStrokeWidth: CGFloat

SSSwiftUIAnimations/Sources/ProgressAnimation/ProgressView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import SwiftUI
99

10-
struct SSProgressView: View {
10+
public struct SSProgressView: View {
1111

1212
// MARK: - Variables
1313

@@ -54,7 +54,7 @@ struct SSProgressView: View {
5454

5555
@State var bounceEffect: CGFloat = 1.0
5656

57-
var body: some View {
57+
public var body: some View {
5858
ZStack {
5959
// Progress Circle with animation
6060
ProgressCircle(progress: $progress, style: style)

0 commit comments

Comments
 (0)