From a70ed26467fa562984f3d9964e2a82e2c7472db3 Mon Sep 17 00:00:00 2001 From: omarthamri Date: Fri, 1 Dec 2023 17:10:01 +0100 Subject: [PATCH] Convert age from Int to String to give user better control --- .../Pods-MyTinderSwipingAnimation_Tests-Info.plist | 2 +- Example/Tests/Info.plist | 2 +- MyTinderSwipingAnimation.podspec | 2 +- Sources/TinderSwipingAnimation/Models/CardModel.swift | 4 ++-- Sources/TinderSwipingAnimation/Views/Card.swift | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Example/Pods/Target Support Files/Pods-MyTinderSwipingAnimation_Tests/Pods-MyTinderSwipingAnimation_Tests-Info.plist b/Example/Pods/Target Support Files/Pods-MyTinderSwipingAnimation_Tests/Pods-MyTinderSwipingAnimation_Tests-Info.plist index 2fb8cfa..7a085d0 100644 --- a/Example/Pods/Target Support Files/Pods-MyTinderSwipingAnimation_Tests/Pods-MyTinderSwipingAnimation_Tests-Info.plist +++ b/Example/Pods/Target Support Files/Pods-MyTinderSwipingAnimation_Tests/Pods-MyTinderSwipingAnimation_Tests-Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.7.2 + 1.7.3 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Tests/Info.plist b/Example/Tests/Info.plist index 58b12cf..f1ae7a2 100644 --- a/Example/Tests/Info.plist +++ b/Example/Tests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.7.2 + 1.7.3 CFBundleSignature ???? CFBundleVersion diff --git a/MyTinderSwipingAnimation.podspec b/MyTinderSwipingAnimation.podspec index 7af26af..da654fc 100644 --- a/MyTinderSwipingAnimation.podspec +++ b/MyTinderSwipingAnimation.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'MyTinderSwipingAnimation' - s.version = '1.7.2' + s.version = '1.7.3' s.summary = 'TinderSwipingAnimation is an easy to use library written using SwiftUI to simplify the implementation of the tinder swipe animation.' # This description is used to generate tags and improve search results. diff --git a/Sources/TinderSwipingAnimation/Models/CardModel.swift b/Sources/TinderSwipingAnimation/Models/CardModel.swift index dbeae08..fa40c13 100644 --- a/Sources/TinderSwipingAnimation/Models/CardModel.swift +++ b/Sources/TinderSwipingAnimation/Models/CardModel.swift @@ -10,10 +10,10 @@ import SwiftUI public struct CardModel { public var name: String public var imageName: String - public var age: Int + public var age: String public var thumbsUpOpacity: Double = 0 public var thumbsDownOpacity: Double = 0 - public init(name: String, imageName: String, age: Int) { + public init(name: String, imageName: String, age: String) { self.name = name self.imageName = imageName self.age = age diff --git a/Sources/TinderSwipingAnimation/Views/Card.swift b/Sources/TinderSwipingAnimation/Views/Card.swift index 920c7ea..27c67cf 100644 --- a/Sources/TinderSwipingAnimation/Views/Card.swift +++ b/Sources/TinderSwipingAnimation/Views/Card.swift @@ -68,7 +68,7 @@ struct Card: View { .font(viewModel.titleFont) .foregroundStyle(viewModel.titleColor) .fontWeight(.bold) - Text("\(card.age)") + Text(card.age) .font(viewModel.subtitleFont) .foregroundStyle(viewModel.subtitleColor) .fontWeight(.bold)