Skip to content

Commit ea83d9d

Browse files
authored
Merge pull request #162 from fermoya/feat/bounce-workaround
workaround binding update issue
2 parents 3e091c5 + 7b1b4a8 commit ea83d9d

22 files changed

+85
-40
lines changed

Example/SwiftUIPagerExample.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
1751176A2573D93F00D809CF /* PagerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 175117692573D93F00D809CF /* PagerModel.swift */; };
1011
17D9E0F423D4CF6700C5AE93 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17D9E0F323D4CF6700C5AE93 /* AppDelegate.swift */; };
1112
17D9E0F623D4CF6700C5AE93 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17D9E0F523D4CF6700C5AE93 /* SceneDelegate.swift */; };
1213
17D9E0F823D4CF6700C5AE93 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17D9E0F723D4CF6700C5AE93 /* ContentView.swift */; };
@@ -50,6 +51,7 @@
5051
/* End PBXCopyFilesBuildPhase section */
5152

5253
/* Begin PBXFileReference section */
54+
175117692573D93F00D809CF /* PagerModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PagerModel.swift; path = ../../Sources/SwiftUIPager/PagerModel.swift; sourceTree = "<group>"; };
5355
17D9E0F023D4CF6700C5AE93 /* SwiftUIPagerExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftUIPagerExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
5456
17D9E0F323D4CF6700C5AE93 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
5557
17D9E0F523D4CF6700C5AE93 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
@@ -155,6 +157,7 @@
155157
6BB1AAD424C9CA1C0032B5A3 /* PagerContent.swift */,
156158
6BC5EDF424866D9500E1E78C /* PagerContent+Buildable.swift */,
157159
6BC5EDFB24866D9500E1E78C /* PagerContent+Helper.swift */,
160+
175117692573D93F00D809CF /* PagerModel.swift */,
158161
6BEF676F24C98B62008533FE /* PageWrapper.swift */,
159162
);
160163
name = Pagination;
@@ -274,6 +277,7 @@
274277
6B9C4A8A24B45F66004C06C5 /* OnDeactivateModifier.swift in Sources */,
275278
6BEA731624ACF8D7007EA8DC /* GesturePriority.swift in Sources */,
276279
6B35B6C125346610000D618F /* PaginationSensitivity.swift in Sources */,
280+
1751176A2573D93F00D809CF /* PagerModel.swift in Sources */,
277281
6BEA731324ACF8D7007EA8DC /* PositionAlignment.swift in Sources */,
278282
6BEA731424ACF8D7007EA8DC /* SwipeDirection.swift in Sources */,
279283
6BC5EE0224866D9500E1E78C /* PagerContent+Helper.swift in Sources */,

Sources/SwiftUIPager/Helpers/Buildable.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
import Foundation
1010

1111
/// Adds a helper function to mutate a properties and help implement _Builder_ pattern
12-
@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
12+
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
1313
protocol Buildable { }
1414

15-
@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
15+
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
1616
extension Buildable {
1717

1818
/// Mutates a property of the instance

Sources/SwiftUIPager/Helpers/CGPoint+Angle.swift

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

99
import SwiftUI
1010

11-
@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
11+
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
1212
extension CGPoint {
1313

1414
var angle: Angle? {
@@ -36,7 +36,7 @@ extension CGPoint {
3636

3737
}
3838

39-
@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
39+
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
4040
extension Angle {
4141
var isAlongXAxis: Bool {
4242
let degrees = ((Int(self.degrees.rounded()) % 360) + 360) % 360

Sources/SwiftUIPager/Helpers/OnDeactivateModifier.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import SwiftUI
1010

1111
/// This modifier allows the `View` to listen to the `UIScene.didActivateNotification` in `iOS`
1212
/// and perform an action when received.
13-
@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
13+
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
1414
struct OnDeactivateView<Content: View>: View {
1515

1616
var content: Content
@@ -29,7 +29,7 @@ struct OnDeactivateView<Content: View>: View {
2929

3030
}
3131

32-
@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
32+
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
3333
extension View {
3434

3535
func onDeactivate(perform: @escaping () -> Void) -> some View {

Sources/SwiftUIPager/Helpers/View+Helper.swift

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

99
import SwiftUI
1010

11-
@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
11+
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
1212
extension View {
1313

1414
func frame(size: CGSize) -> some View {

Sources/SwiftUIPager/PageConfiguration/ContentLoadingPolicy.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
/// Policy to follow when loading content
11-
@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
11+
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
1212
public enum ContentLoadingPolicy: Equatable {
1313

1414
/// Content is loaded on demand by applying a recycling the ratio.

Sources/SwiftUIPager/PageConfiguration/GesturePriority.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import SwiftUI
1010

1111
/// Defines a set of priorities to interact with gestures
12-
@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
12+
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
1313
public enum GesturePriority {
1414
/// Refers to `highPriorityGesture` modifier
1515
case high
@@ -24,7 +24,7 @@ public enum GesturePriority {
2424
static let `default`: GesturePriority = .normal
2525
}
2626

27-
@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
27+
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
2828
extension View {
2929

3030
func gesture<T>(_ gesture: T, priority: GesturePriority) -> some View where T : Gesture {

Sources/SwiftUIPager/PageConfiguration/PaginationSensitivity.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import CoreGraphics
1010

1111
/// Defines how sensitive the pagination is to determine whether or not to move to the next the page.
12-
@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
12+
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
1313
public enum PaginationSensitivity: Equatable {
1414

1515
/// The shift relative to container size needs to be greater than or equal to 75%

Sources/SwiftUIPager/PageConfiguration/PagingAnimation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import SwiftUI
1010

1111
/// Animation to be used when the user stops dragging
12-
@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
12+
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
1313
public enum PagingAnimation: Equatable {
1414

1515
/// Highly steep curve. Very fast on start, slow on end.

Sources/SwiftUIPager/PageConfiguration/PositionAlignment.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import CoreGraphics
99

1010
/// `Alignment` determines the focused page alignment inside `Pager`
11-
@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
11+
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
1212
public enum PositionAlignment {
1313
/// Sets the alignment to be centered
1414
case center

0 commit comments

Comments
 (0)