Skip to content

Commit 788a0fd

Browse files
authored
Feat/bottom sheet plus alpha (#17)
* fix: implement missing updateUIViewController and safely unwrap position * feat: included manually disable drag and exclude positions * fix: small fix to prevent scrollview from snapping back to initial position after dragging * fix: fixed a bug where values would not compare due to rounding issues * fix: added example overview and included small updateview bugfixes * feat: groundwork for v2 of the bottomsheet * feat: work in progress for new bottom sheet interface * fix: added missing view modifiers * feat: included dragging on scroll section * fix: fixed wrong height on detents * fix: patched snapping issue on fractions * fix: fix on height detent * feat: included translation callback * feat: added custom animation curve support * feat: small fixes and included background on sheet * fix: link background as background property * feat: including examples back in and adding swiftlint * fix: fixed example issues on the new bottomsheet configuration * chore: more clean up and small UI refinements * feat: example refactor for scalability * fix: implementation of working top level lists rendering * fix: attempting to fix list inside the sheet * chore: prepare bottomsheet plus for alpha release * chore: rebase to main * fix: updated readme to resemble new bottomsheet configuration
1 parent 44ab410 commit 788a0fd

27 files changed

Lines changed: 898 additions & 838 deletions

Example/BottomSheetExample.xcodeproj/project.pbxproj

Lines changed: 51 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,32 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
6C0B59F127DAB989006D979A /* BottomSheet in Frameworks */ = {isa = PBXBuildFile; productRef = 6C0B59F027DAB989006D979A /* BottomSheet */; };
1110
6C0BD46D27DA862D000AF3CD /* BottomSheetExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C0BD46C27DA862D000AF3CD /* BottomSheetExampleApp.swift */; };
12-
6C0BD46F27DA862D000AF3CD /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C0BD46E27DA862D000AF3CD /* ContentView.swift */; };
1311
6C0BD47127DA862D000AF3CD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6C0BD47027DA862D000AF3CD /* Assets.xcassets */; };
1412
6C0BD47427DA862D000AF3CD /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6C0BD47327DA862D000AF3CD /* Preview Assets.xcassets */; };
13+
6C6EB0B6292AEADC00106A1D /* BottomSheet in Frameworks */ = {isa = PBXBuildFile; productRef = 6C6EB0B5292AEADC00106A1D /* BottomSheet */; };
1514
6C763147283D774500463709 /* ExampleOverview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C763146283D774500463709 /* ExampleOverview.swift */; };
1615
6CDF5A0D27ED33C7004609F4 /* CornerRadius.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CDF5A0C27ED33C7004609F4 /* CornerRadius.swift */; };
16+
6CF78515293D36FB000E6581 /* StocksExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CF78514293D36FB000E6581 /* StocksExample.swift */; };
1717
/* End PBXBuildFile section */
1818

1919
/* Begin PBXFileReference section */
2020
6C0BD46927DA862D000AF3CD /* BottomSheetExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BottomSheetExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
2121
6C0BD46C27DA862D000AF3CD /* BottomSheetExampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BottomSheetExampleApp.swift; sourceTree = "<group>"; };
22-
6C0BD46E27DA862D000AF3CD /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
2322
6C0BD47027DA862D000AF3CD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
2423
6C0BD47327DA862D000AF3CD /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
24+
6C1DE0102889CF10003C6EE9 /* BottomSheet */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = BottomSheet; path = ..; sourceTree = "<group>"; };
2525
6C763146283D774500463709 /* ExampleOverview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleOverview.swift; sourceTree = "<group>"; };
2626
6CDF5A0C27ED33C7004609F4 /* CornerRadius.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CornerRadius.swift; sourceTree = "<group>"; };
27+
6CF78514293D36FB000E6581 /* StocksExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StocksExample.swift; sourceTree = "<group>"; };
2728
/* End PBXFileReference section */
2829

2930
/* Begin PBXFrameworksBuildPhase section */
3031
6C0BD46627DA862D000AF3CD /* Frameworks */ = {
3132
isa = PBXFrameworksBuildPhase;
3233
buildActionMask = 2147483647;
3334
files = (
34-
6C0B59F127DAB989006D979A /* BottomSheet in Frameworks */,
35+
6C6EB0B6292AEADC00106A1D /* BottomSheet in Frameworks */,
3536
);
3637
runOnlyForDeploymentPostprocessing = 0;
3738
};
@@ -41,6 +42,7 @@
4142
6C0BD46027DA862C000AF3CD = {
4243
isa = PBXGroup;
4344
children = (
45+
6C1DE0102889CF10003C6EE9 /* BottomSheet */,
4446
6C0BD46B27DA862D000AF3CD /* BottomSheetExample */,
4547
6C0BD46A27DA862D000AF3CD /* Products */,
4648
6C0BD47A27DA87A1000AF3CD /* Frameworks */,
@@ -60,7 +62,7 @@
6062
children = (
6163
6C0BD46C27DA862D000AF3CD /* BottomSheetExampleApp.swift */,
6264
6C763146283D774500463709 /* ExampleOverview.swift */,
63-
6C0BD46E27DA862D000AF3CD /* ContentView.swift */,
65+
6CF78516293D3703000E6581 /* Apple Applications */,
6466
6CDF5A0E27ED33D3004609F4 /* View Modifiers */,
6567
6C0BD47027DA862D000AF3CD /* Assets.xcassets */,
6668
6C0BD47227DA862D000AF3CD /* Preview Content */,
@@ -91,6 +93,14 @@
9193
path = "View Modifiers";
9294
sourceTree = "<group>";
9395
};
96+
6CF78516293D3703000E6581 /* Apple Applications */ = {
97+
isa = PBXGroup;
98+
children = (
99+
6CF78514293D36FB000E6581 /* StocksExample.swift */,
100+
);
101+
path = "Apple Applications";
102+
sourceTree = "<group>";
103+
};
94104
/* End PBXGroup section */
95105

96106
/* Begin PBXNativeTarget section */
@@ -100,6 +110,7 @@
100110
buildPhases = (
101111
6C0BD46527DA862D000AF3CD /* Sources */,
102112
6C0BD46627DA862D000AF3CD /* Frameworks */,
113+
6C939DBE294DFF9200F6EF50 /* Swiftlint */,
103114
6C0BD46727DA862D000AF3CD /* Resources */,
104115
);
105116
buildRules = (
@@ -108,7 +119,7 @@
108119
);
109120
name = BottomSheetExample;
110121
packageProductDependencies = (
111-
6C0B59F027DAB989006D979A /* BottomSheet */,
122+
6C6EB0B5292AEADC00106A1D /* BottomSheet */,
112123
);
113124
productName = BottomSheetExample;
114125
productReference = 6C0BD46927DA862D000AF3CD /* BottomSheetExample.app */;
@@ -139,7 +150,6 @@
139150
);
140151
mainGroup = 6C0BD46027DA862C000AF3CD;
141152
packageReferences = (
142-
6C0B59EF27DAB989006D979A /* XCRemoteSwiftPackageReference "BottomSheet" */,
143153
);
144154
productRefGroup = 6C0BD46A27DA862D000AF3CD /* Products */;
145155
projectDirPath = "";
@@ -162,15 +172,37 @@
162172
};
163173
/* End PBXResourcesBuildPhase section */
164174

175+
/* Begin PBXShellScriptBuildPhase section */
176+
6C939DBE294DFF9200F6EF50 /* Swiftlint */ = {
177+
isa = PBXShellScriptBuildPhase;
178+
alwaysOutOfDate = 1;
179+
buildActionMask = 2147483647;
180+
files = (
181+
);
182+
inputFileListPaths = (
183+
);
184+
inputPaths = (
185+
);
186+
name = Swiftlint;
187+
outputFileListPaths = (
188+
);
189+
outputPaths = (
190+
);
191+
runOnlyForDeploymentPostprocessing = 0;
192+
shellPath = /bin/sh;
193+
shellScript = "export PATH=\"$PATH:/opt/homebrew/bin\"\nif which swiftlint > /dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
194+
};
195+
/* End PBXShellScriptBuildPhase section */
196+
165197
/* Begin PBXSourcesBuildPhase section */
166198
6C0BD46527DA862D000AF3CD /* Sources */ = {
167199
isa = PBXSourcesBuildPhase;
168200
buildActionMask = 2147483647;
169201
files = (
170-
6C0BD46F27DA862D000AF3CD /* ContentView.swift in Sources */,
171202
6C0BD46D27DA862D000AF3CD /* BottomSheetExampleApp.swift in Sources */,
172203
6CDF5A0D27ED33C7004609F4 /* CornerRadius.swift in Sources */,
173204
6C763147283D774500463709 /* ExampleOverview.swift in Sources */,
205+
6CF78515293D36FB000E6581 /* StocksExample.swift in Sources */,
174206
);
175207
runOnlyForDeploymentPostprocessing = 0;
176208
};
@@ -300,17 +332,16 @@
300332
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
301333
CODE_SIGN_STYLE = Automatic;
302334
CURRENT_PROJECT_VERSION = 1;
303-
DEVELOPMENT_ASSET_PATHS = "\"BottomSheetExample/Preview Content\"";
304-
DEVELOPMENT_TEAM = JU6AZT44CN;
335+
DEVELOPMENT_ASSET_PATHS = "BottomSheetExample/Preview\\ Content";
336+
DEVELOPMENT_TEAM = KZAMEFAGHT;
305337
ENABLE_PREVIEWS = YES;
306338
GENERATE_INFOPLIST_FILE = YES;
307339
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
308340
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
309341
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
310342
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
311-
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
312-
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
313-
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
343+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
344+
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
314345
LD_RUNPATH_SEARCH_PATHS = (
315346
"$(inherited)",
316347
"@executable_path/Frameworks",
@@ -320,7 +351,7 @@
320351
PRODUCT_NAME = "$(TARGET_NAME)";
321352
SWIFT_EMIT_LOC_STRINGS = YES;
322353
SWIFT_VERSION = 5.0;
323-
TARGETED_DEVICE_FAMILY = 1;
354+
TARGETED_DEVICE_FAMILY = "1,2";
324355
};
325356
name = Debug;
326357
};
@@ -331,17 +362,16 @@
331362
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
332363
CODE_SIGN_STYLE = Automatic;
333364
CURRENT_PROJECT_VERSION = 1;
334-
DEVELOPMENT_ASSET_PATHS = "\"BottomSheetExample/Preview Content\"";
335-
DEVELOPMENT_TEAM = JU6AZT44CN;
365+
DEVELOPMENT_ASSET_PATHS = "BottomSheetExample/Preview\\ Content";
366+
DEVELOPMENT_TEAM = KZAMEFAGHT;
336367
ENABLE_PREVIEWS = YES;
337368
GENERATE_INFOPLIST_FILE = YES;
338369
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
339370
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
340371
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
341372
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
342-
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
343-
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
344-
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
373+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
374+
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
345375
LD_RUNPATH_SEARCH_PATHS = (
346376
"$(inherited)",
347377
"@executable_path/Frameworks",
@@ -351,7 +381,7 @@
351381
PRODUCT_NAME = "$(TARGET_NAME)";
352382
SWIFT_EMIT_LOC_STRINGS = YES;
353383
SWIFT_VERSION = 5.0;
354-
TARGETED_DEVICE_FAMILY = 1;
384+
TARGETED_DEVICE_FAMILY = "1,2";
355385
};
356386
name = Release;
357387
};
@@ -378,21 +408,9 @@
378408
};
379409
/* End XCConfigurationList section */
380410

381-
/* Begin XCRemoteSwiftPackageReference section */
382-
6C0B59EF27DAB989006D979A /* XCRemoteSwiftPackageReference "BottomSheet" */ = {
383-
isa = XCRemoteSwiftPackageReference;
384-
repositoryURL = "https://github.com/Wouter125/BottomSheet";
385-
requirement = {
386-
kind = upToNextMajorVersion;
387-
minimumVersion = 1.0.1;
388-
};
389-
};
390-
/* End XCRemoteSwiftPackageReference section */
391-
392411
/* Begin XCSwiftPackageProductDependency section */
393-
6C0B59F027DAB989006D979A /* BottomSheet */ = {
412+
6C6EB0B5292AEADC00106A1D /* BottomSheet */ = {
394413
isa = XCSwiftPackageProductDependency;
395-
package = 6C0B59EF27DAB989006D979A /* XCRemoteSwiftPackageReference "BottomSheet" */;
396414
productName = BottomSheet;
397415
};
398416
/* End XCSwiftPackageProductDependency section */
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>PreviewsEnabled</key>
6+
<false/>
7+
</dict>
8+
</plist>

Example/BottomSheetExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1410"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "6C0BD46827DA862D000AF3CD"
18+
BuildableName = "BottomSheetExample.app"
19+
BlueprintName = "BottomSheetExample"
20+
ReferencedContainer = "container:BottomSheetExample.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Debug"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
<BuildableProductRunnable
44+
runnableDebuggingMode = "0">
45+
<BuildableReference
46+
BuildableIdentifier = "primary"
47+
BlueprintIdentifier = "6C0BD46827DA862D000AF3CD"
48+
BuildableName = "BottomSheetExample.app"
49+
BlueprintName = "BottomSheetExample"
50+
ReferencedContainer = "container:BottomSheetExample.xcodeproj">
51+
</BuildableReference>
52+
</BuildableProductRunnable>
53+
</LaunchAction>
54+
<ProfileAction
55+
buildConfiguration = "Release"
56+
shouldUseLaunchSchemeArgsEnv = "YES"
57+
savedToolIdentifier = ""
58+
useCustomWorkingDirectory = "NO"
59+
debugDocumentVersioning = "YES">
60+
<BuildableProductRunnable
61+
runnableDebuggingMode = "0">
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "6C0BD46827DA862D000AF3CD"
65+
BuildableName = "BottomSheetExample.app"
66+
BlueprintName = "BottomSheetExample"
67+
ReferencedContainer = "container:BottomSheetExample.xcodeproj">
68+
</BuildableReference>
69+
</BuildableProductRunnable>
70+
</ProfileAction>
71+
<AnalyzeAction
72+
buildConfiguration = "Debug">
73+
</AnalyzeAction>
74+
<ArchiveAction
75+
buildConfiguration = "Release"
76+
revealArchiveInOrganizer = "YES">
77+
</ArchiveAction>
78+
</Scheme>

0 commit comments

Comments
 (0)