Skip to content

Commit

Permalink
Lower target to iOS 10
Browse files Browse the repository at this point in the history
  • Loading branch information
teameh committed May 28, 2020
1 parent d0ed8fd commit 3a65d7b
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let package = Package(
name: "SwiftUIPager",
platforms: [
.macOS(.v10_15),
.iOS(.v13),
.iOS(.v10),
.watchOS(.v6)
],
products: [
Expand Down
3 changes: 3 additions & 0 deletions Sources/SwiftUIPager/Helpers/SizeViewModifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import SwiftUI

/// This modifier wraps a view into a `GeometryReader` and tracks the available space by using `SizePreferenceKey` on the content
@available(iOS 13.0, macOS 10.15, watchOS 6.0, *)
struct SizeViewModifier: ViewModifier {

@Binding var size: CGSize
Expand All @@ -34,6 +35,7 @@ struct SizeViewModifier: ViewModifier {

}

@available(iOS 13.0, macOS 10.15, watchOS 6.0, *)
extension View {

func onReload(perform: @escaping () -> Void) -> some View {
Expand All @@ -46,6 +48,7 @@ extension View {

}

@available(iOS 13.0, macOS 10.15, watchOS 6.0, *)
extension View {

/// Tracks the size available for the view
Expand Down
1 change: 1 addition & 0 deletions Sources/SwiftUIPager/Helpers/View+Helper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import SwiftUI

@available(iOS 13.0, macOS 10.15, watchOS 6.0, *)
extension View {

func frame(size: CGSize) -> some View {
Expand Down
1 change: 1 addition & 0 deletions Sources/SwiftUIPager/Pager+Buildable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import SwiftUI

@available(iOS 13.0, macOS 10.15, watchOS 6.0, *)
extension Pager: Buildable {

/// Swipe direction for a vertical `Pager`
Expand Down
1 change: 1 addition & 0 deletions Sources/SwiftUIPager/Pager+Helper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import SwiftUI

@available(iOS 13.0, macOS 10.15, watchOS 6.0, *)
extension Pager {

/// Work around to avoid @State keeps wrong value
Expand Down
3 changes: 3 additions & 0 deletions Sources/SwiftUIPager/Pager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import SwiftUI
/// - 30 px of vertical insets
/// - 0.6 shrink ratio for items that aren't focused.
///
@available(iOS 13.0, macOS 10.15, watchOS 6.0, *)
public struct Pager<Element, ID, PageView>: View where PageView: View, Element: Equatable, ID: Hashable {

/// `Direction` determines the direction of the swipe gesture
Expand Down Expand Up @@ -173,6 +174,7 @@ public struct Pager<Element, ID, PageView>: View where PageView: View, Element:

}

@available(iOS 13.0, macOS 10.15, watchOS 6.0, *)
extension Pager where ID == Element.ID, Element : Identifiable {

/// Initializes a new Pager.
Expand All @@ -190,6 +192,7 @@ extension Pager where ID == Element.ID, Element : Identifiable {

// MARK: Gestures

@available(iOS 13.0, macOS 10.15, watchOS 6.0, *)
extension Pager {

/// `DragGesture` customized to work with `Pager`
Expand Down
1 change: 1 addition & 0 deletions Tests/SwiftUIPagerTests/Pager+Buildable_Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import XCTest
import SwiftUI
@testable import SwiftUIPager

@available(iOS 13.0, macOS 10.15, watchOS 6.0, *)
final class Pager_Buildable_Tests: XCTestCase {

var givenPager: Pager<Int, Int, Text> {
Expand Down
1 change: 1 addition & 0 deletions Tests/SwiftUIPagerTests/Pager+Helper_Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import XCTest
import SwiftUI
@testable import SwiftUIPager

@available(iOS 13.0, macOS 10.15, watchOS 6.0, *)
final class Pager_Helper_Tests: XCTestCase {

var givenPager: Pager<Int, Int, Text> {
Expand Down
1 change: 1 addition & 0 deletions Tests/SwiftUIPagerTests/View+Helper_Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import XCTest
import SwiftUI
@testable import SwiftUIPager

@available(iOS 13.0, macOS 10.15, watchOS 6.0, *)
final class View_Helper_Tests: XCTestCase {

func test_GivenView_WhenFrameWithSize_Then_Frame() {
Expand Down

0 comments on commit 3a65d7b

Please sign in to comment.