Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.5.0 #18

Merged
merged 6 commits into from
Sep 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions Examples/PageViewDemo WatchKit Extension/ContentView.swift
Expand Up @@ -22,6 +22,13 @@ struct ContentView: View {
CustomListView(pageIndex: 4)
CustomView(pageIndex: 5)
}.edgesIgnoringSafeArea(.init(arrayLiteral: .leading, .trailing, .bottom))

// ForEach Horizontal
// HPageView(selectedPage: $selectedPage, data: 0..<6) { i in
// CustomButtonView(pageIndex: i)
// }
// .edgesIgnoringSafeArea(.init(arrayLiteral: .leading, .trailing, .bottom))

// Vertical
// VPageView(selectedPage: $selectedPage) {
// CustomButtonView(pageIndex: 0)
Expand All @@ -31,6 +38,12 @@ struct ContentView: View {
// CustomView(pageIndex: 4)
// CustomView(pageIndex: 5)
// }.edgesIgnoringSafeArea(.init(arrayLiteral: .leading, .trailing, .bottom))

// ForEach Vertical
// VPageView(selectedPage: $selectedPage, data: 0..<6) { i in
// CustomButtonView(pageIndex: i)
// }
// .edgesIgnoringSafeArea(.init(arrayLiteral: .leading, .trailing, .bottom))
}
}

Expand Down
16 changes: 12 additions & 4 deletions Examples/PageViewDemo.xcodeproj/project.pbxproj
Expand Up @@ -7,6 +7,8 @@
objects = {

/* Begin PBXBuildFile section */
E2080C0F2704C9C2001DC9AE /* PageGestureType.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2080C0E2704C9C2001DC9AE /* PageGestureType.swift */; };
E2080C102704C9C2001DC9AE /* PageGestureType.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2080C0E2704C9C2001DC9AE /* PageGestureType.swift */; };
E211E06623F219F9000EB7DA /* PageControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = E211E06323F219F9000EB7DA /* PageControl.swift */; };
E211E06723F219F9000EB7DA /* PageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E211E06423F219F9000EB7DA /* PageView.swift */; };
E211E06823F219F9000EB7DA /* PageControlTheme.swift in Sources */ = {isa = PBXBuildFile; fileRef = E211E06523F219F9000EB7DA /* PageControlTheme.swift */; };
Expand Down Expand Up @@ -81,6 +83,7 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
E2080C0E2704C9C2001DC9AE /* PageGestureType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PageGestureType.swift; path = ../Sources/PageGestureType.swift; sourceTree = "<group>"; };
E211E05C23F21695000EB7DA /* PageView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = PageView.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E211E05F23F2169A000EB7DA /* PageView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = PageView.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E211E06323F219F9000EB7DA /* PageControl.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PageControl.swift; path = ../Sources/PageControl.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -138,6 +141,7 @@
E211E07123F30C49000EB7DA /* PageContent.swift */,
E211E07023F30C49000EB7DA /* PageScrollState.swift */,
E2B0F9CD242568510065DFBE /* PageViewBuilder.swift */,
E2080C0E2704C9C2001DC9AE /* PageGestureType.swift */,
);
name = PageView;
sourceTree = "<group>";
Expand Down Expand Up @@ -376,6 +380,7 @@
E711489323EF7D14009ABC2D /* SceneDelegate.swift in Sources */,
E211E07423F30C49000EB7DA /* PageContent.swift in Sources */,
E711489523EF7D14009ABC2D /* ContentView.swift in Sources */,
E2080C0F2704C9C2001DC9AE /* PageGestureType.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -393,6 +398,7 @@
E71148BA23EF7D16009ABC2D /* ExtensionDelegate.swift in Sources */,
E211E07523F30C49000EB7DA /* PageContent.swift in Sources */,
E211E06B23F21A27000EB7DA /* PageView.swift in Sources */,
E2080C102704C9C2001DC9AE /* PageGestureType.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -565,7 +571,7 @@
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 6.1;
WATCHOS_DEPLOYMENT_TARGET = 7.0;
};
name = Debug;
};
Expand All @@ -589,7 +595,7 @@
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 6.1;
WATCHOS_DEPLOYMENT_TARGET = 7.0;
};
name = Release;
};
Expand All @@ -608,7 +614,7 @@
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 6.1;
WATCHOS_DEPLOYMENT_TARGET = 7.0;
};
name = Debug;
};
Expand All @@ -627,7 +633,7 @@
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 6.1;
WATCHOS_DEPLOYMENT_TARGET = 7.0;
};
name = Release;
};
Expand All @@ -640,6 +646,7 @@
DEVELOPMENT_TEAM = JE2494MFB5;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = PageViewDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -660,6 +667,7 @@
DEVELOPMENT_TEAM = JE2494MFB5;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = PageViewDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
21 changes: 19 additions & 2 deletions Examples/PageViewDemo/ContentView.swift
Expand Up @@ -13,18 +13,35 @@ struct ContentView: View {
@State var selectedPage = 2

var body: some View {
// horizontal
// Horizontal
HPageView(selectedPage: $selectedPage) {
CustomView(pageIndex: 0)
CustomListView(pageIndex: 1)
CustomView(pageIndex: 2)
}
// vertical

// ForEach Horizontal
// HPageView(selectedPage: $selectedPage, data: 0..<6) { i in
// CustomView(pageIndex: i)
// }

// Vertical
// VPageView(selectedPage: $selectedPage) {
// CustomView(pageIndex: 0)
// CustomView(pageIndex: 1)
// CustomView(pageIndex: 2)
// }

// ForEach Vertical
// VPageView(selectedPage: $selectedPage, data: 0..<6) { i in
// CustomView(pageIndex: i)
// }
}
}

extension Int: Identifiable {
public var id: Int {
return self
}
}

Expand Down
6 changes: 3 additions & 3 deletions Package.swift
@@ -1,13 +1,13 @@
// swift-tools-version:5.1
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "PageView",
platforms: [
.iOS(.v13),
.watchOS(.v6)
.iOS(.v14),
.watchOS(.v7)
],
products: [
.library(name: "PageView", targets: ["PageView"]),
Expand Down