Skip to content

Commit 088ebd4

Browse files
committed
Update the demo
1 parent afc154d commit 088ebd4

File tree

15 files changed

+97
-87
lines changed

15 files changed

+97
-87
lines changed

Demo/Demo.xcodeproj/project.pbxproj

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 60;
6+
objectVersion = 70;
77
objects = {
88

99
/* Begin PBXBuildFile section */
1010
A97CA013298EBEC6001EB4F3 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = A97CA012298EBEC6001EB4F3 /* DemoApp.swift */; };
1111
A97CA015298EBEC6001EB4F3 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A97CA014298EBEC6001EB4F3 /* ContentView.swift */; };
12-
A97CA017298EBEC7001EB4F3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A97CA016298EBEC7001EB4F3 /* Assets.xcassets */; };
13-
A97CA01A298EBEC7001EB4F3 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A97CA019298EBEC7001EB4F3 /* Preview Assets.xcassets */; };
1412
A97CA023298EBF8F001EB4F3 /* DemoScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A97CA022298EBF8F001EB4F3 /* DemoScreen.swift */; };
1513
A97CA026298EC05D001EB4F3 /* ScrollKit in Frameworks */ = {isa = PBXBuildFile; productRef = A97CA025298EC05D001EB4F3 /* ScrollKit */; };
1614
A9CBE3032CB13D8100DFE99A /* ScrollKit in Frameworks */ = {isa = PBXBuildFile; productRef = A9CBE3022CB13D8100DFE99A /* ScrollKit */; };
@@ -20,12 +18,14 @@
2018
A97CA00F298EBEC6001EB4F3 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
2119
A97CA012298EBEC6001EB4F3 /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = "<group>"; };
2220
A97CA014298EBEC6001EB4F3 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
23-
A97CA016298EBEC7001EB4F3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
24-
A97CA019298EBEC7001EB4F3 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
2521
A97CA022298EBF8F001EB4F3 /* DemoScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoScreen.swift; sourceTree = "<group>"; };
2622
A97CA027298ECAAD001EB4F3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
2723
/* End PBXFileReference section */
2824

25+
/* Begin PBXFileSystemSynchronizedRootGroup section */
26+
A99346142EAA016100712E38 /* Resources */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Resources; sourceTree = "<group>"; };
27+
/* End PBXFileSystemSynchronizedRootGroup section */
28+
2929
/* Begin PBXFrameworksBuildPhase section */
3030
A97CA00C298EBEC6001EB4F3 /* Frameworks */ = {
3131
isa = PBXFrameworksBuildPhase;
@@ -59,24 +59,15 @@
5959
A97CA011298EBEC6001EB4F3 /* Demo */ = {
6060
isa = PBXGroup;
6161
children = (
62-
A97CA018298EBEC7001EB4F3 /* Preview Content */,
62+
A99346142EAA016100712E38 /* Resources */,
6363
A97CA027298ECAAD001EB4F3 /* Info.plist */,
6464
A97CA012298EBEC6001EB4F3 /* DemoApp.swift */,
6565
A97CA022298EBF8F001EB4F3 /* DemoScreen.swift */,
6666
A97CA014298EBEC6001EB4F3 /* ContentView.swift */,
67-
A97CA016298EBEC7001EB4F3 /* Assets.xcassets */,
6867
);
6968
path = Demo;
7069
sourceTree = "<group>";
7170
};
72-
A97CA018298EBEC7001EB4F3 /* Preview Content */ = {
73-
isa = PBXGroup;
74-
children = (
75-
A97CA019298EBEC7001EB4F3 /* Preview Assets.xcassets */,
76-
);
77-
path = "Preview Content";
78-
sourceTree = "<group>";
79-
};
8071
A97CA024298EC05D001EB4F3 /* Frameworks */ = {
8172
isa = PBXGroup;
8273
children = (
@@ -99,6 +90,9 @@
9990
);
10091
dependencies = (
10192
);
93+
fileSystemSynchronizedGroups = (
94+
A99346142EAA016100712E38 /* Resources */,
95+
);
10296
name = Demo;
10397
packageProductDependencies = (
10498
A97CA025298EC05D001EB4F3 /* ScrollKit */,
@@ -116,7 +110,7 @@
116110
attributes = {
117111
BuildIndependentTargetsInParallel = 1;
118112
LastSwiftUpdateCheck = 1420;
119-
LastUpgradeCheck = 1420;
113+
LastUpgradeCheck = 2600;
120114
ORGANIZATIONNAME = "Daniel Saidi";
121115
TargetAttributes = {
122116
A97CA00E298EBEC6001EB4F3 = {
@@ -150,8 +144,6 @@
150144
isa = PBXResourcesBuildPhase;
151145
buildActionMask = 2147483647;
152146
files = (
153-
A97CA01A298EBEC7001EB4F3 /* Preview Assets.xcassets in Resources */,
154-
A97CA017298EBEC7001EB4F3 /* Assets.xcassets in Resources */,
155147
);
156148
runOnlyForDeploymentPostprocessing = 0;
157149
};
@@ -205,8 +197,11 @@
205197
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
206198
COPY_PHASE_STRIP = NO;
207199
DEBUG_INFORMATION_FORMAT = dwarf;
200+
DEVELOPMENT_TEAM = PMEDFW438U;
201+
DRIVERKIT_DEPLOYMENT_TARGET = 25.0;
208202
ENABLE_STRICT_OBJC_MSGSEND = YES;
209203
ENABLE_TESTABILITY = YES;
204+
ENABLE_USER_SCRIPT_SANDBOXING = YES;
210205
GCC_C_LANGUAGE_STANDARD = gnu11;
211206
GCC_DYNAMIC_NO_PIC = NO;
212207
GCC_NO_COMMON_BLOCKS = YES;
@@ -221,13 +216,18 @@
221216
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
222217
GCC_WARN_UNUSED_FUNCTION = YES;
223218
GCC_WARN_UNUSED_VARIABLE = YES;
224-
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
219+
IPHONEOS_DEPLOYMENT_TARGET = 26.0;
220+
MACOSX_DEPLOYMENT_TARGET = 26.0;
225221
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
226222
MTL_FAST_MATH = YES;
227223
ONLY_ACTIVE_ARCH = YES;
228224
SDKROOT = iphoneos;
225+
STRING_CATALOG_GENERATE_SYMBOLS = YES;
229226
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
230227
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
228+
TVOS_DEPLOYMENT_TARGET = 26.0;
229+
WATCHOS_DEPLOYMENT_TARGET = 26.0;
230+
XROS_DEPLOYMENT_TARGET = 26.0;
231231
};
232232
name = Debug;
233233
};
@@ -265,8 +265,11 @@
265265
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
266266
COPY_PHASE_STRIP = NO;
267267
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
268+
DEVELOPMENT_TEAM = PMEDFW438U;
269+
DRIVERKIT_DEPLOYMENT_TARGET = 25.0;
268270
ENABLE_NS_ASSERTIONS = NO;
269271
ENABLE_STRICT_OBJC_MSGSEND = YES;
272+
ENABLE_USER_SCRIPT_SANDBOXING = YES;
270273
GCC_C_LANGUAGE_STANDARD = gnu11;
271274
GCC_NO_COMMON_BLOCKS = YES;
272275
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -275,13 +278,18 @@
275278
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
276279
GCC_WARN_UNUSED_FUNCTION = YES;
277280
GCC_WARN_UNUSED_VARIABLE = YES;
278-
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
281+
IPHONEOS_DEPLOYMENT_TARGET = 26.0;
282+
MACOSX_DEPLOYMENT_TARGET = 26.0;
279283
MTL_ENABLE_DEBUG_INFO = NO;
280284
MTL_FAST_MATH = YES;
281285
SDKROOT = iphoneos;
286+
STRING_CATALOG_GENERATE_SYMBOLS = YES;
282287
SWIFT_COMPILATION_MODE = wholemodule;
283288
SWIFT_OPTIMIZATION_LEVEL = "-O";
289+
TVOS_DEPLOYMENT_TARGET = 26.0;
284290
VALIDATE_PRODUCT = YES;
291+
WATCHOS_DEPLOYMENT_TARGET = 26.0;
292+
XROS_DEPLOYMENT_TARGET = 26.0;
285293
};
286294
name = Release;
287295
};
@@ -292,11 +300,10 @@
292300
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
293301
CODE_SIGN_STYLE = Automatic;
294302
CURRENT_PROJECT_VERSION = 1;
295-
DEVELOPMENT_ASSET_PATHS = "\"Demo/Preview Content\"";
296-
DEVELOPMENT_TEAM = PMEDFW438U;
297303
ENABLE_PREVIEWS = YES;
298304
GENERATE_INFOPLIST_FILE = YES;
299305
INFOPLIST_FILE = Demo/Info.plist;
306+
INFOPLIST_KEY_CFBundleDisplayName = ScrollKit;
300307
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
301308
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
302309
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
@@ -322,11 +329,10 @@
322329
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
323330
CODE_SIGN_STYLE = Automatic;
324331
CURRENT_PROJECT_VERSION = 1;
325-
DEVELOPMENT_ASSET_PATHS = "\"Demo/Preview Content\"";
326-
DEVELOPMENT_TEAM = PMEDFW438U;
327332
ENABLE_PREVIEWS = YES;
328333
GENERATE_INFOPLIST_FILE = YES;
329334
INFOPLIST_FILE = Demo/Info.plist;
335+
INFOPLIST_KEY_CFBundleDisplayName = ScrollKit;
330336
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
331337
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
332338
INFOPLIST_KEY_UILaunchScreen_Generation = YES;

Demo/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 0 additions & 14 deletions
This file was deleted.
-152 KB
Binary file not shown.

Demo/Demo/ContentView.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,15 @@ import ScrollKit
1212
struct ContentView: View {
1313

1414
var body: some View {
15-
NavigationView {
15+
NavigationStack {
1616
List {
1717
linkSection
1818
spotifySection
1919
}
2020
.tint(.blue)
21-
.navigationTitle("Demo")
21+
.navigationTitle("ScrollKit")
2222
.toolbarColorScheme(.light, for: .navigationBar)
2323
}
24-
.tint(.white)
25-
.navigationViewStyle(.stack)
26-
.toolbarRole(.navigationStack)
2724
}
2825
}
2926

@@ -50,7 +47,7 @@ private extension ContentView {
5047

5148
var colorLink: some View {
5249
link("paintbrush.pointed.fill", "Color") {
53-
DemoScreen(headerHeight: 100) {
50+
DemoScreen(headerHeight: 250) {
5451
Color.blue
5552
}
5653
}

Demo/Demo/DemoScreen.swift

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct DemoScreen<HeaderView: View>: View {
3030
ScrollViewWithStickyHeader(
3131
header: header,
3232
headerHeight: headerHeight,
33-
headerMinHeight: 75,
33+
// headerMinHeight: 50,
3434
scrollManager: scrollManager,
3535
onScroll: handleScrollOffset
3636
) {
@@ -52,16 +52,6 @@ struct DemoScreen<HeaderView: View>: View {
5252
.previewHeaderContent()
5353
.opacity(1 - visibleHeaderRatio)
5454
}
55-
ToolbarItemGroup(placement: .topBarTrailing) {
56-
Menu("Scroll to...") {
57-
Button("Header") {
58-
scrollManager.scroll(to: .header)
59-
}
60-
Button("Content") {
61-
scrollManager.scroll(to: .content)
62-
}
63-
}
64-
}
6555
}
6656
.toolbarBackground(.hidden)
6757
.statusBarHidden(scrollOffset.y > -3)

Demo/Demo/Preview Content/Preview Assets.xcassets/Contents.json

Lines changed: 0 additions & 6 deletions
This file was deleted.
84.6 KB
Loading
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"color-space-for-untagged-svg-colors" : "display-p3",
3+
"fill" : {
4+
"linear-gradient" : [
5+
"display-p3:0.04819,0.15344,0.36938,1.00000",
6+
"display-p3:0.03528,0.10236,0.24500,1.00000"
7+
],
8+
"orientation" : {
9+
"start" : {
10+
"x" : 0.5,
11+
"y" : 0
12+
},
13+
"stop" : {
14+
"x" : 0.5,
15+
"y" : 0.7
16+
}
17+
}
18+
},
19+
"groups" : [
20+
{
21+
"blur-material" : null,
22+
"hidden" : false,
23+
"layers" : [
24+
{
25+
"blend-mode" : "normal",
26+
"glass" : false,
27+
"image-name" : "ScrollKit 4.png",
28+
"name" : "ScrollKit 4",
29+
"position" : {
30+
"scale" : 0.78,
31+
"translation-in-points" : [
32+
0,
33+
0
34+
]
35+
}
36+
}
37+
],
38+
"name" : "Middle",
39+
"shadow" : {
40+
"kind" : "neutral",
41+
"opacity" : 0.5
42+
},
43+
"specular" : true,
44+
"translucency" : {
45+
"enabled" : true,
46+
"value" : 0.5
47+
}
48+
}
49+
],
50+
"supported-platforms" : {
51+
"circles" : [
52+
"watchOS"
53+
],
54+
"squares" : "shared"
55+
}
56+
}

Demo/Demo/Assets.xcassets/AccentColor.colorset/Contents.json renamed to Demo/Demo/Resources/Assets.xcassets/AccentColor.colorset/Contents.json

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)