├── .gitignore ├── .swiftpm └── xcode │ └── package.xcworkspace │ └── contents.xcworkspacedata ├── LICENSE ├── Package.swift ├── PartialSheet-Example ├── PartialSheet-Example (iOS).entitlements ├── PartialSheet-Example.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── Shared │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x-1.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x-1.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x-1.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ ├── Icon-App-83.5x83.5@2x.png │ │ └── ItunesArtwork@2x.png │ └── Contents.json │ ├── ContentView.swift │ ├── Examples │ ├── AnimationContentExample.swift │ ├── BaseExample.swift │ ├── BlurredSheetExample.swift │ ├── CustonAnimationExample.swift │ ├── DatePickerExample.swift │ ├── GradientSheetExample.swift │ ├── HandlerBarFreeExample.swift │ ├── ListExample.swift │ ├── PickerExample.swift │ ├── PushNavigationExample.swift │ ├── ScrollViewExample.swift │ └── TextfieldExample.swift │ └── PartialSheet_ExampleApp.swift ├── README.md ├── Sources └── PartialSheet │ ├── Extensions │ ├── EnvironmentValues+SafeAreaInsets.swift │ ├── View+EraseToAnyView.swift │ ├── View+FrameTrackerModifier.swift │ └── View+IfDeviceType.swift │ ├── PartialSheet │ ├── PSIpadMacStyle.swift │ ├── PSIphoneStyle.swift │ ├── PSManager.swift │ ├── PSManagerWrapper.swift │ ├── PSSlideAnimation.swift │ ├── PSType.swift │ ├── PSViewModifier.swift │ ├── PartialSheet+DragGesture.swift │ └── PartialSheet+Keyboard.swift │ ├── Public │ ├── PSButton.swift │ └── View+PartialSheet.swift │ └── VIews │ └── PSScrollVIew.swift └── _config.yml /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /.build 3 | /Packages 4 | /*.xcodeproj 5 | xcuserdata/ 6 | DerivedData/ 7 | .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata 8 | -------------------------------------------------------------------------------- /.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Andrea Miotto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.5 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | 4 | import PackageDescription 5 | 6 | let package = Package( 7 | name: "PartialSheet", 8 | platforms: [.iOS(.v15)], 9 | products: [ 10 | // Products define the executables and libraries a package produces, and make them visible to other packages. 11 | .library( 12 | name: "PartialSheet", 13 | targets: ["PartialSheet"]), 14 | ], 15 | dependencies: [ 16 | // Dependencies declare other packages that this package depends on. 17 | // .package(url: /* package url */, from: "1.0.0"), 18 | ], 19 | targets: [ 20 | // Targets are the basic building blocks of a package. A target can define a module or a test suite. 21 | // Targets can depend on other targets in this package, and on products in packages this package depends on. 22 | .target( 23 | name: "PartialSheet", 24 | dependencies: [], 25 | path: "Sources" 26 | ) 27 | ] 28 | ) 29 | -------------------------------------------------------------------------------- /PartialSheet-Example/PartialSheet-Example (iOS).entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.network.client 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /PartialSheet-Example/PartialSheet-Example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 55; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 01B5932127CA9E6A00072948 /* ScrollViewExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01B5932027CA9E6A00072948 /* ScrollViewExample.swift */; }; 11 | 01B5932427CD29E300072948 /* CustonAnimationExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01B5932327CD29E300072948 /* CustonAnimationExample.swift */; }; 12 | 01D345DD27CA61D40061D4C7 /* PartialSheet_ExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01D345CD27CA61D20061D4C7 /* PartialSheet_ExampleApp.swift */; }; 13 | 01D345DF27CA61D40061D4C7 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01D345CE27CA61D20061D4C7 /* ContentView.swift */; }; 14 | 01D345E127CA61D40061D4C7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 01D345CF27CA61D40061D4C7 /* Assets.xcassets */; }; 15 | 01D345F127CA63450061D4C7 /* PartialSheet in Frameworks */ = {isa = PBXBuildFile; productRef = 01D345F027CA63450061D4C7 /* PartialSheet */; }; 16 | 01D3460027CA64E40061D4C7 /* BlurredSheetExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01D345F727CA64E30061D4C7 /* BlurredSheetExample.swift */; }; 17 | 01D3460227CA64E40061D4C7 /* HandlerBarFreeExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01D345F827CA64E30061D4C7 /* HandlerBarFreeExample.swift */; }; 18 | 01D3460427CA64E40061D4C7 /* AnimationContentExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01D345F927CA64E40061D4C7 /* AnimationContentExample.swift */; }; 19 | 01D3460627CA64E40061D4C7 /* PickerExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01D345FA27CA64E40061D4C7 /* PickerExample.swift */; }; 20 | 01D3460827CA64E40061D4C7 /* TextfieldExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01D345FB27CA64E40061D4C7 /* TextfieldExample.swift */; }; 21 | 01D3460A27CA64E40061D4C7 /* DatePickerExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01D345FC27CA64E40061D4C7 /* DatePickerExample.swift */; }; 22 | 01D3460C27CA64E40061D4C7 /* ListExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01D345FD27CA64E40061D4C7 /* ListExample.swift */; }; 23 | 01D3460E27CA64E40061D4C7 /* BaseExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01D345FE27CA64E40061D4C7 /* BaseExample.swift */; }; 24 | 01D3461027CA64E40061D4C7 /* PushNavigationExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01D345FF27CA64E40061D4C7 /* PushNavigationExample.swift */; }; 25 | 65AE69B82A9F7A6600DDA4F1 /* GradientSheetExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AE69B72A9F7A6500DDA4F1 /* GradientSheetExample.swift */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXFileReference section */ 29 | 01B5931F27CA985E00072948 /* PartialSheet-Example (iOS).entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "PartialSheet-Example (iOS).entitlements"; sourceTree = ""; }; 30 | 01B5932027CA9E6A00072948 /* ScrollViewExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScrollViewExample.swift; sourceTree = ""; }; 31 | 01B5932327CD29E300072948 /* CustonAnimationExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustonAnimationExample.swift; sourceTree = ""; }; 32 | 01D345CD27CA61D20061D4C7 /* PartialSheet_ExampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartialSheet_ExampleApp.swift; sourceTree = ""; }; 33 | 01D345CE27CA61D20061D4C7 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 34 | 01D345CF27CA61D40061D4C7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 35 | 01D345D427CA61D40061D4C7 /* PartialSheet-Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "PartialSheet-Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 36 | 01D345F727CA64E30061D4C7 /* BlurredSheetExample.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BlurredSheetExample.swift; sourceTree = ""; }; 37 | 01D345F827CA64E30061D4C7 /* HandlerBarFreeExample.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HandlerBarFreeExample.swift; sourceTree = ""; }; 38 | 01D345F927CA64E40061D4C7 /* AnimationContentExample.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimationContentExample.swift; sourceTree = ""; }; 39 | 01D345FA27CA64E40061D4C7 /* PickerExample.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PickerExample.swift; sourceTree = ""; }; 40 | 01D345FB27CA64E40061D4C7 /* TextfieldExample.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextfieldExample.swift; sourceTree = ""; }; 41 | 01D345FC27CA64E40061D4C7 /* DatePickerExample.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatePickerExample.swift; sourceTree = ""; }; 42 | 01D345FD27CA64E40061D4C7 /* ListExample.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListExample.swift; sourceTree = ""; }; 43 | 01D345FE27CA64E40061D4C7 /* BaseExample.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseExample.swift; sourceTree = ""; }; 44 | 01D345FF27CA64E40061D4C7 /* PushNavigationExample.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PushNavigationExample.swift; sourceTree = ""; }; 45 | 01F64A5727CD89E8000D9AC0 /* PartialSheet */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = PartialSheet; path = ..; sourceTree = ""; }; 46 | 65AE69B72A9F7A6500DDA4F1 /* GradientSheetExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GradientSheetExample.swift; sourceTree = ""; }; 47 | /* End PBXFileReference section */ 48 | 49 | /* Begin PBXFrameworksBuildPhase section */ 50 | 01D345D127CA61D40061D4C7 /* Frameworks */ = { 51 | isa = PBXFrameworksBuildPhase; 52 | buildActionMask = 2147483647; 53 | files = ( 54 | 01D345F127CA63450061D4C7 /* PartialSheet in Frameworks */, 55 | ); 56 | runOnlyForDeploymentPostprocessing = 0; 57 | }; 58 | /* End PBXFrameworksBuildPhase section */ 59 | 60 | /* Begin PBXGroup section */ 61 | 01B5932227CD29C900072948 /* Examples */ = { 62 | isa = PBXGroup; 63 | children = ( 64 | 01D345F927CA64E40061D4C7 /* AnimationContentExample.swift */, 65 | 01D345FE27CA64E40061D4C7 /* BaseExample.swift */, 66 | 01B5932327CD29E300072948 /* CustonAnimationExample.swift */, 67 | 01B5932027CA9E6A00072948 /* ScrollViewExample.swift */, 68 | 01D345F727CA64E30061D4C7 /* BlurredSheetExample.swift */, 69 | 65AE69B72A9F7A6500DDA4F1 /* GradientSheetExample.swift */, 70 | 01D345FC27CA64E40061D4C7 /* DatePickerExample.swift */, 71 | 01D345F827CA64E30061D4C7 /* HandlerBarFreeExample.swift */, 72 | 01D345FD27CA64E40061D4C7 /* ListExample.swift */, 73 | 01D345FA27CA64E40061D4C7 /* PickerExample.swift */, 74 | 01D345FF27CA64E40061D4C7 /* PushNavigationExample.swift */, 75 | 01D345FB27CA64E40061D4C7 /* TextfieldExample.swift */, 76 | ); 77 | path = Examples; 78 | sourceTree = ""; 79 | }; 80 | 01D345C727CA61D20061D4C7 = { 81 | isa = PBXGroup; 82 | children = ( 83 | 01F64A5627CD89E8000D9AC0 /* Packages */, 84 | 01B5931F27CA985E00072948 /* PartialSheet-Example (iOS).entitlements */, 85 | 01D345CC27CA61D20061D4C7 /* Shared */, 86 | 01D345D527CA61D40061D4C7 /* Products */, 87 | 01D345EF27CA63450061D4C7 /* Frameworks */, 88 | ); 89 | sourceTree = ""; 90 | }; 91 | 01D345CC27CA61D20061D4C7 /* Shared */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | 01B5932227CD29C900072948 /* Examples */, 95 | 01D345CD27CA61D20061D4C7 /* PartialSheet_ExampleApp.swift */, 96 | 01D345CE27CA61D20061D4C7 /* ContentView.swift */, 97 | 01D345CF27CA61D40061D4C7 /* Assets.xcassets */, 98 | ); 99 | path = Shared; 100 | sourceTree = ""; 101 | }; 102 | 01D345D527CA61D40061D4C7 /* Products */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 01D345D427CA61D40061D4C7 /* PartialSheet-Example.app */, 106 | ); 107 | name = Products; 108 | sourceTree = ""; 109 | }; 110 | 01D345EF27CA63450061D4C7 /* Frameworks */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | ); 114 | name = Frameworks; 115 | sourceTree = ""; 116 | }; 117 | 01F64A5627CD89E8000D9AC0 /* Packages */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 01F64A5727CD89E8000D9AC0 /* PartialSheet */, 121 | ); 122 | name = Packages; 123 | sourceTree = ""; 124 | }; 125 | /* End PBXGroup section */ 126 | 127 | /* Begin PBXNativeTarget section */ 128 | 01D345D327CA61D40061D4C7 /* PartialSheet-Example (iOS) */ = { 129 | isa = PBXNativeTarget; 130 | buildConfigurationList = 01D345E527CA61D40061D4C7 /* Build configuration list for PBXNativeTarget "PartialSheet-Example (iOS)" */; 131 | buildPhases = ( 132 | 01D345D027CA61D40061D4C7 /* Sources */, 133 | 01D345D127CA61D40061D4C7 /* Frameworks */, 134 | 01D345D227CA61D40061D4C7 /* Resources */, 135 | ); 136 | buildRules = ( 137 | ); 138 | dependencies = ( 139 | ); 140 | name = "PartialSheet-Example (iOS)"; 141 | packageProductDependencies = ( 142 | 01D345F027CA63450061D4C7 /* PartialSheet */, 143 | ); 144 | productName = "PartialSheet-Example (iOS)"; 145 | productReference = 01D345D427CA61D40061D4C7 /* PartialSheet-Example.app */; 146 | productType = "com.apple.product-type.application"; 147 | }; 148 | /* End PBXNativeTarget section */ 149 | 150 | /* Begin PBXProject section */ 151 | 01D345C827CA61D20061D4C7 /* Project object */ = { 152 | isa = PBXProject; 153 | attributes = { 154 | BuildIndependentTargetsInParallel = 1; 155 | LastSwiftUpdateCheck = 1320; 156 | LastUpgradeCheck = 1320; 157 | ORGANIZATIONNAME = PartialSheet; 158 | TargetAttributes = { 159 | 01D345D327CA61D40061D4C7 = { 160 | CreatedOnToolsVersion = 13.2.1; 161 | }; 162 | }; 163 | }; 164 | buildConfigurationList = 01D345CB27CA61D20061D4C7 /* Build configuration list for PBXProject "PartialSheet-Example" */; 165 | compatibilityVersion = "Xcode 13.0"; 166 | developmentRegion = en; 167 | hasScannedForEncodings = 0; 168 | knownRegions = ( 169 | en, 170 | Base, 171 | ); 172 | mainGroup = 01D345C727CA61D20061D4C7; 173 | productRefGroup = 01D345D527CA61D40061D4C7 /* Products */; 174 | projectDirPath = ""; 175 | projectRoot = ""; 176 | targets = ( 177 | 01D345D327CA61D40061D4C7 /* PartialSheet-Example (iOS) */, 178 | ); 179 | }; 180 | /* End PBXProject section */ 181 | 182 | /* Begin PBXResourcesBuildPhase section */ 183 | 01D345D227CA61D40061D4C7 /* Resources */ = { 184 | isa = PBXResourcesBuildPhase; 185 | buildActionMask = 2147483647; 186 | files = ( 187 | 01D345E127CA61D40061D4C7 /* Assets.xcassets in Resources */, 188 | ); 189 | runOnlyForDeploymentPostprocessing = 0; 190 | }; 191 | /* End PBXResourcesBuildPhase section */ 192 | 193 | /* Begin PBXSourcesBuildPhase section */ 194 | 01D345D027CA61D40061D4C7 /* Sources */ = { 195 | isa = PBXSourcesBuildPhase; 196 | buildActionMask = 2147483647; 197 | files = ( 198 | 01D3461027CA64E40061D4C7 /* PushNavigationExample.swift in Sources */, 199 | 01D3460627CA64E40061D4C7 /* PickerExample.swift in Sources */, 200 | 01D3460027CA64E40061D4C7 /* BlurredSheetExample.swift in Sources */, 201 | 01B5932127CA9E6A00072948 /* ScrollViewExample.swift in Sources */, 202 | 01B5932427CD29E300072948 /* CustonAnimationExample.swift in Sources */, 203 | 01D3460A27CA64E40061D4C7 /* DatePickerExample.swift in Sources */, 204 | 01D3460827CA64E40061D4C7 /* TextfieldExample.swift in Sources */, 205 | 01D3460C27CA64E40061D4C7 /* ListExample.swift in Sources */, 206 | 01D345DF27CA61D40061D4C7 /* ContentView.swift in Sources */, 207 | 65AE69B82A9F7A6600DDA4F1 /* GradientSheetExample.swift in Sources */, 208 | 01D345DD27CA61D40061D4C7 /* PartialSheet_ExampleApp.swift in Sources */, 209 | 01D3460427CA64E40061D4C7 /* AnimationContentExample.swift in Sources */, 210 | 01D3460227CA64E40061D4C7 /* HandlerBarFreeExample.swift in Sources */, 211 | 01D3460E27CA64E40061D4C7 /* BaseExample.swift in Sources */, 212 | ); 213 | runOnlyForDeploymentPostprocessing = 0; 214 | }; 215 | /* End PBXSourcesBuildPhase section */ 216 | 217 | /* Begin XCBuildConfiguration section */ 218 | 01D345E327CA61D40061D4C7 /* Debug */ = { 219 | isa = XCBuildConfiguration; 220 | buildSettings = { 221 | ALWAYS_SEARCH_USER_PATHS = NO; 222 | CLANG_ANALYZER_NONNULL = YES; 223 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 224 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; 225 | CLANG_CXX_LIBRARY = "libc++"; 226 | CLANG_ENABLE_MODULES = YES; 227 | CLANG_ENABLE_OBJC_ARC = YES; 228 | CLANG_ENABLE_OBJC_WEAK = YES; 229 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 230 | CLANG_WARN_BOOL_CONVERSION = YES; 231 | CLANG_WARN_COMMA = YES; 232 | CLANG_WARN_CONSTANT_CONVERSION = YES; 233 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 234 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 235 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 236 | CLANG_WARN_EMPTY_BODY = YES; 237 | CLANG_WARN_ENUM_CONVERSION = YES; 238 | CLANG_WARN_INFINITE_RECURSION = YES; 239 | CLANG_WARN_INT_CONVERSION = YES; 240 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 241 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 242 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 243 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 244 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 245 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 246 | CLANG_WARN_STRICT_PROTOTYPES = YES; 247 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 248 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 249 | CLANG_WARN_UNREACHABLE_CODE = YES; 250 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 251 | COPY_PHASE_STRIP = NO; 252 | DEBUG_INFORMATION_FORMAT = dwarf; 253 | ENABLE_STRICT_OBJC_MSGSEND = YES; 254 | ENABLE_TESTABILITY = YES; 255 | GCC_C_LANGUAGE_STANDARD = gnu11; 256 | GCC_DYNAMIC_NO_PIC = NO; 257 | GCC_NO_COMMON_BLOCKS = YES; 258 | GCC_OPTIMIZATION_LEVEL = 0; 259 | GCC_PREPROCESSOR_DEFINITIONS = ( 260 | "DEBUG=1", 261 | "$(inherited)", 262 | ); 263 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 264 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 265 | GCC_WARN_UNDECLARED_SELECTOR = YES; 266 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 267 | GCC_WARN_UNUSED_FUNCTION = YES; 268 | GCC_WARN_UNUSED_VARIABLE = YES; 269 | IPHONEOS_DEPLOYMENT_TARGET = 15.0; 270 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 271 | MTL_FAST_MATH = YES; 272 | ONLY_ACTIVE_ARCH = YES; 273 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 274 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 275 | }; 276 | name = Debug; 277 | }; 278 | 01D345E427CA61D40061D4C7 /* Release */ = { 279 | isa = XCBuildConfiguration; 280 | buildSettings = { 281 | ALWAYS_SEARCH_USER_PATHS = NO; 282 | CLANG_ANALYZER_NONNULL = YES; 283 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 284 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; 285 | CLANG_CXX_LIBRARY = "libc++"; 286 | CLANG_ENABLE_MODULES = YES; 287 | CLANG_ENABLE_OBJC_ARC = YES; 288 | CLANG_ENABLE_OBJC_WEAK = YES; 289 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 290 | CLANG_WARN_BOOL_CONVERSION = YES; 291 | CLANG_WARN_COMMA = YES; 292 | CLANG_WARN_CONSTANT_CONVERSION = YES; 293 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 294 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 295 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 296 | CLANG_WARN_EMPTY_BODY = YES; 297 | CLANG_WARN_ENUM_CONVERSION = YES; 298 | CLANG_WARN_INFINITE_RECURSION = YES; 299 | CLANG_WARN_INT_CONVERSION = YES; 300 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 301 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 302 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 303 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 304 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 305 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 306 | CLANG_WARN_STRICT_PROTOTYPES = YES; 307 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 308 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 309 | CLANG_WARN_UNREACHABLE_CODE = YES; 310 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 311 | COPY_PHASE_STRIP = NO; 312 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 313 | ENABLE_NS_ASSERTIONS = NO; 314 | ENABLE_STRICT_OBJC_MSGSEND = YES; 315 | GCC_C_LANGUAGE_STANDARD = gnu11; 316 | GCC_NO_COMMON_BLOCKS = YES; 317 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 318 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 319 | GCC_WARN_UNDECLARED_SELECTOR = YES; 320 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 321 | GCC_WARN_UNUSED_FUNCTION = YES; 322 | GCC_WARN_UNUSED_VARIABLE = YES; 323 | IPHONEOS_DEPLOYMENT_TARGET = 15.0; 324 | MTL_ENABLE_DEBUG_INFO = NO; 325 | MTL_FAST_MATH = YES; 326 | SWIFT_COMPILATION_MODE = wholemodule; 327 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 328 | }; 329 | name = Release; 330 | }; 331 | 01D345E627CA61D40061D4C7 /* Debug */ = { 332 | isa = XCBuildConfiguration; 333 | buildSettings = { 334 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 335 | CODE_SIGN_ENTITLEMENTS = "PartialSheet-Example (iOS).entitlements"; 336 | CODE_SIGN_STYLE = Automatic; 337 | CURRENT_PROJECT_VERSION = 1; 338 | DEVELOPMENT_TEAM = 23536XD8LD; 339 | ENABLE_PREVIEWS = YES; 340 | GENERATE_INFOPLIST_FILE = YES; 341 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; 342 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 343 | INFOPLIST_KEY_UILaunchScreen_Generation = YES; 344 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 345 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 346 | IPHONEOS_DEPLOYMENT_TARGET = 15.2; 347 | LD_RUNPATH_SEARCH_PATHS = ( 348 | "$(inherited)", 349 | "@executable_path/Frameworks", 350 | ); 351 | MARKETING_VERSION = 1.0; 352 | PRODUCT_BUNDLE_IDENTIFIER = "com.PartialSheet.PartialSheet-Example"; 353 | PRODUCT_NAME = "PartialSheet-Example"; 354 | SDKROOT = iphoneos; 355 | SUPPORTS_MACCATALYST = YES; 356 | SWIFT_EMIT_LOC_STRINGS = YES; 357 | SWIFT_VERSION = 5.0; 358 | TARGETED_DEVICE_FAMILY = "1,2,6"; 359 | }; 360 | name = Debug; 361 | }; 362 | 01D345E727CA61D40061D4C7 /* Release */ = { 363 | isa = XCBuildConfiguration; 364 | buildSettings = { 365 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 366 | CODE_SIGN_ENTITLEMENTS = "PartialSheet-Example (iOS).entitlements"; 367 | CODE_SIGN_STYLE = Automatic; 368 | CURRENT_PROJECT_VERSION = 1; 369 | DEVELOPMENT_TEAM = 23536XD8LD; 370 | ENABLE_PREVIEWS = YES; 371 | GENERATE_INFOPLIST_FILE = YES; 372 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; 373 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 374 | INFOPLIST_KEY_UILaunchScreen_Generation = YES; 375 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 376 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 377 | IPHONEOS_DEPLOYMENT_TARGET = 15.2; 378 | LD_RUNPATH_SEARCH_PATHS = ( 379 | "$(inherited)", 380 | "@executable_path/Frameworks", 381 | ); 382 | MARKETING_VERSION = 1.0; 383 | PRODUCT_BUNDLE_IDENTIFIER = "com.PartialSheet.PartialSheet-Example"; 384 | PRODUCT_NAME = "PartialSheet-Example"; 385 | SDKROOT = iphoneos; 386 | SUPPORTS_MACCATALYST = YES; 387 | SWIFT_EMIT_LOC_STRINGS = YES; 388 | SWIFT_VERSION = 5.0; 389 | TARGETED_DEVICE_FAMILY = "1,2,6"; 390 | VALIDATE_PRODUCT = YES; 391 | }; 392 | name = Release; 393 | }; 394 | /* End XCBuildConfiguration section */ 395 | 396 | /* Begin XCConfigurationList section */ 397 | 01D345CB27CA61D20061D4C7 /* Build configuration list for PBXProject "PartialSheet-Example" */ = { 398 | isa = XCConfigurationList; 399 | buildConfigurations = ( 400 | 01D345E327CA61D40061D4C7 /* Debug */, 401 | 01D345E427CA61D40061D4C7 /* Release */, 402 | ); 403 | defaultConfigurationIsVisible = 0; 404 | defaultConfigurationName = Release; 405 | }; 406 | 01D345E527CA61D40061D4C7 /* Build configuration list for PBXNativeTarget "PartialSheet-Example (iOS)" */ = { 407 | isa = XCConfigurationList; 408 | buildConfigurations = ( 409 | 01D345E627CA61D40061D4C7 /* Debug */, 410 | 01D345E727CA61D40061D4C7 /* Release */, 411 | ); 412 | defaultConfigurationIsVisible = 0; 413 | defaultConfigurationName = Release; 414 | }; 415 | /* End XCConfigurationList section */ 416 | 417 | /* Begin XCSwiftPackageProductDependency section */ 418 | 01D345F027CA63450061D4C7 /* PartialSheet */ = { 419 | isa = XCSwiftPackageProductDependency; 420 | productName = PartialSheet; 421 | }; 422 | /* End XCSwiftPackageProductDependency section */ 423 | }; 424 | rootObject = 01D345C827CA61D20061D4C7 /* Project object */; 425 | } 426 | -------------------------------------------------------------------------------- /PartialSheet-Example/PartialSheet-Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PartialSheet-Example/PartialSheet-Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Icon-App-20x20@2x.png", 5 | "idiom" : "iphone", 6 | "scale" : "2x", 7 | "size" : "20x20" 8 | }, 9 | { 10 | "filename" : "Icon-App-20x20@3x.png", 11 | "idiom" : "iphone", 12 | "scale" : "3x", 13 | "size" : "20x20" 14 | }, 15 | { 16 | "filename" : "Icon-App-29x29@2x.png", 17 | "idiom" : "iphone", 18 | "scale" : "2x", 19 | "size" : "29x29" 20 | }, 21 | { 22 | "filename" : "Icon-App-29x29@3x.png", 23 | "idiom" : "iphone", 24 | "scale" : "3x", 25 | "size" : "29x29" 26 | }, 27 | { 28 | "filename" : "Icon-App-40x40@2x.png", 29 | "idiom" : "iphone", 30 | "scale" : "2x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "filename" : "Icon-App-40x40@3x.png", 35 | "idiom" : "iphone", 36 | "scale" : "3x", 37 | "size" : "40x40" 38 | }, 39 | { 40 | "filename" : "Icon-App-60x60@2x.png", 41 | "idiom" : "iphone", 42 | "scale" : "2x", 43 | "size" : "60x60" 44 | }, 45 | { 46 | "filename" : "Icon-App-60x60@3x.png", 47 | "idiom" : "iphone", 48 | "scale" : "3x", 49 | "size" : "60x60" 50 | }, 51 | { 52 | "filename" : "Icon-App-20x20@1x.png", 53 | "idiom" : "ipad", 54 | "scale" : "1x", 55 | "size" : "20x20" 56 | }, 57 | { 58 | "filename" : "Icon-App-20x20@2x-1.png", 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "20x20" 62 | }, 63 | { 64 | "filename" : "Icon-App-29x29@1x.png", 65 | "idiom" : "ipad", 66 | "scale" : "1x", 67 | "size" : "29x29" 68 | }, 69 | { 70 | "filename" : "Icon-App-29x29@2x-1.png", 71 | "idiom" : "ipad", 72 | "scale" : "2x", 73 | "size" : "29x29" 74 | }, 75 | { 76 | "filename" : "Icon-App-40x40@1x.png", 77 | "idiom" : "ipad", 78 | "scale" : "1x", 79 | "size" : "40x40" 80 | }, 81 | { 82 | "filename" : "Icon-App-40x40@2x-1.png", 83 | "idiom" : "ipad", 84 | "scale" : "2x", 85 | "size" : "40x40" 86 | }, 87 | { 88 | "filename" : "Icon-App-76x76@1x.png", 89 | "idiom" : "ipad", 90 | "scale" : "1x", 91 | "size" : "76x76" 92 | }, 93 | { 94 | "filename" : "Icon-App-76x76@2x.png", 95 | "idiom" : "ipad", 96 | "scale" : "2x", 97 | "size" : "76x76" 98 | }, 99 | { 100 | "filename" : "Icon-App-83.5x83.5@2x.png", 101 | "idiom" : "ipad", 102 | "scale" : "2x", 103 | "size" : "83.5x83.5" 104 | }, 105 | { 106 | "filename" : "ItunesArtwork@2x.png", 107 | "idiom" : "ios-marketing", 108 | "scale" : "1x", 109 | "size" : "1024x1024" 110 | } 111 | ], 112 | "info" : { 113 | "author" : "xcode", 114 | "version" : 1 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreaMiotto/PartialSheet/76b8ba559cde8124a2d8d3363b9da3fafabcef9f/PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreaMiotto/PartialSheet/76b8ba559cde8124a2d8d3363b9da3fafabcef9f/PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x-1.png -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreaMiotto/PartialSheet/76b8ba559cde8124a2d8d3363b9da3fafabcef9f/PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreaMiotto/PartialSheet/76b8ba559cde8124a2d8d3363b9da3fafabcef9f/PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreaMiotto/PartialSheet/76b8ba559cde8124a2d8d3363b9da3fafabcef9f/PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreaMiotto/PartialSheet/76b8ba559cde8124a2d8d3363b9da3fafabcef9f/PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x-1.png -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreaMiotto/PartialSheet/76b8ba559cde8124a2d8d3363b9da3fafabcef9f/PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreaMiotto/PartialSheet/76b8ba559cde8124a2d8d3363b9da3fafabcef9f/PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreaMiotto/PartialSheet/76b8ba559cde8124a2d8d3363b9da3fafabcef9f/PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreaMiotto/PartialSheet/76b8ba559cde8124a2d8d3363b9da3fafabcef9f/PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-1.png -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreaMiotto/PartialSheet/76b8ba559cde8124a2d8d3363b9da3fafabcef9f/PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreaMiotto/PartialSheet/76b8ba559cde8124a2d8d3363b9da3fafabcef9f/PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreaMiotto/PartialSheet/76b8ba559cde8124a2d8d3363b9da3fafabcef9f/PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreaMiotto/PartialSheet/76b8ba559cde8124a2d8d3363b9da3fafabcef9f/PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreaMiotto/PartialSheet/76b8ba559cde8124a2d8d3363b9da3fafabcef9f/PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreaMiotto/PartialSheet/76b8ba559cde8124a2d8d3363b9da3fafabcef9f/PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreaMiotto/PartialSheet/76b8ba559cde8124a2d8d3363b9da3fafabcef9f/PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreaMiotto/PartialSheet/76b8ba559cde8124a2d8d3363b9da3fafabcef9f/PartialSheet-Example/Shared/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // Shared 4 | // 5 | // Created by Andrea Miotto on 26/02/22. 6 | // 7 | 8 | import SwiftUI 9 | import PartialSheet 10 | 11 | struct ContentView: View { 12 | 13 | var body: some View { 14 | NavigationView { 15 | VStack(alignment: .leading) { 16 | List { 17 | Section { 18 | Text(""" 19 | Partial Sheet modifier will display a totally custom sheet with an height based on its content.\n 20 | In this way the sheet will cover the screen only for the space it will need.\n 21 | On iPad and Mac devices it will present a normal .sheet view. 22 | """) 23 | .font(.footnote) 24 | .padding() 25 | } 26 | Section("Examples") { 27 | NavigationLink( 28 | destination: BasicExample(), 29 | label: {Text("Basic Example") 30 | }) 31 | NavigationLink( 32 | destination: TextfieldExample(), 33 | label: {Text("TextField Example") 34 | }) 35 | NavigationLink( 36 | destination: ListExample(), 37 | label: {Text("List Example") 38 | }) 39 | NavigationLink( 40 | destination: ScrollViewExample(), 41 | label: {Text("ScrollView Example") 42 | }) 43 | NavigationLink( 44 | destination: PushNavigationExample(), 45 | label: {Text("Push Navigation Example") 46 | }) 47 | NavigationLink( 48 | destination: DatePickerExample(), 49 | label: {Text("DatePicker Example") 50 | }) 51 | NavigationLink( 52 | destination: PickerExample(), 53 | label: {Text("Picker Example") 54 | }) 55 | NavigationLink( 56 | destination: BlurredExample(), 57 | label: {Text("Blurred Example") 58 | }) 59 | NavigationLink( 60 | destination: GradientExample(), 61 | label: {Text("Gradient Example") 62 | }) 63 | NavigationLink( 64 | destination: AnimationContentExample(), 65 | label: {Text("AnimationContent Example") 66 | }) 67 | Group { 68 | NavigationLink( 69 | destination: HandleBarFreeExample(), 70 | label: {Text("HandleBarFree Example") 71 | }) 72 | NavigationLink( 73 | destination: CustonSlideAnimationExample(), 74 | label: {Text("Custom Slide Example") 75 | }) 76 | } 77 | } 78 | } 79 | } 80 | .navigationBarTitle("Partial Sheet") 81 | } 82 | .navigationViewStyle(StackNavigationViewStyle()) 83 | .attachPartialSheetToRoot() 84 | } 85 | } 86 | 87 | struct ContentView_Previews: PreviewProvider { 88 | static var previews: some View { 89 | ContentView() 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Examples/AnimationContentExample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationContentExample.swift 3 | // PartialSheetExample 4 | // 5 | // Created by Eliott Robson on 21/09/2020. 6 | // Copyright © 2020 Swift. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | import PartialSheet 11 | 12 | struct AnimationContentExample: View { 13 | @State private var isSheetPresented = false 14 | 15 | var body: some View { 16 | VStack { 17 | Button( 18 | action: { 19 | isSheetPresented = true 20 | }, 21 | label: { 22 | Text("Show Partial Sheet") 23 | } 24 | ) 25 | } 26 | .partialSheet(isPresented: $isSheetPresented, content: AnimationSheetView.init) 27 | } 28 | } 29 | 30 | struct AnimationSheetView: View { 31 | @State private var explicitScale: CGFloat = 1 32 | @State private var implicitScale: CGFloat = 1 33 | @State private var noScale: CGFloat = 1 34 | 35 | var body: some View { 36 | VStack { 37 | Text("Tap to animate explicitly") 38 | .padding() 39 | .background(Color.green) 40 | .cornerRadius(5) 41 | .scaleEffect(explicitScale) 42 | .onTapGesture { 43 | withAnimation { 44 | explicitScale = CGFloat.random(in: 0.5..<1.5) 45 | } 46 | } 47 | 48 | Text("Tap to animate implicitly") 49 | .padding() 50 | .background(Color.orange) 51 | .cornerRadius(5) 52 | .scaleEffect(implicitScale) 53 | .animation(.default, value: implicitScale) 54 | .onTapGesture { 55 | implicitScale = CGFloat.random(in: 0.5..<1.5) 56 | } 57 | 58 | Text("Tap to change with no animation") 59 | .padding() 60 | .background(Color.red) 61 | .cornerRadius(5) 62 | .scaleEffect(noScale) 63 | .onTapGesture { 64 | noScale = CGFloat.random(in: 0.5..<1.5) 65 | } 66 | } 67 | .padding() 68 | } 69 | } 70 | 71 | struct AnimationContentExample_Previews: PreviewProvider { 72 | static var previews: some View { 73 | NavigationView { 74 | AnimationContentExample() 75 | } 76 | .attachPartialSheetToRoot() 77 | .navigationViewStyle(StackNavigationViewStyle()) 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Examples/BaseExample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NormalExample.swift 3 | // PartialSheetExample 4 | // 5 | // Created by Andrea Miotto on 29/4/20. 6 | // Copyright © 2020 Swift. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | import PartialSheet 11 | 12 | struct BasicExample: View { 13 | @State private var isSheetPresented = false 14 | 15 | var body: some View { 16 | HStack { 17 | Spacer() 18 | PSButton( 19 | isPresenting: $isSheetPresented, 20 | label: { 21 | Text("Display the Partial Sheet") 22 | }) 23 | .padding() 24 | Spacer() 25 | } 26 | .partialSheet( 27 | isPresented: $isSheetPresented, 28 | onDismiss: { 29 | print("On Dismiss Called") 30 | }, 31 | content: SheetView.init 32 | ) 33 | .navigationBarTitle("Basic Example") 34 | .navigationViewStyle(StackNavigationViewStyle()) 35 | } 36 | } 37 | 38 | struct BasicExample_Previews: PreviewProvider { 39 | static var previews: some View { 40 | NavigationView { 41 | BasicExample() 42 | } 43 | .attachPartialSheetToRoot() 44 | .navigationViewStyle(StackNavigationViewStyle()) 45 | } 46 | } 47 | 48 | struct SheetView: View { 49 | @State private var longer: Bool = false 50 | @State private var text: String = "some text" 51 | 52 | var body: some View { 53 | VStack(alignment: .leading, spacing: 0) { 54 | Group { 55 | HStack { 56 | Spacer() 57 | Text("Settings Panel") 58 | .font(.headline) 59 | Spacer() 60 | } 61 | 62 | Text("Vestibulum iaculis sagittis sem, vel hendrerit ex. ") 63 | .font(.body) 64 | .lineLimit(2) 65 | 66 | Toggle(isOn: self.$longer) { 67 | Text("Advanced") 68 | } 69 | } 70 | .padding(0) 71 | .frame(height: 50) 72 | if self.longer { 73 | VStack { 74 | Divider() 75 | Spacer() 76 | Text("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce vestibulum porttitor ligula quis faucibus. Maecenas auctor tincidunt maximus. Donec lectus dui, fermentum sed orci gravida, porttitor porta dui. ") 77 | Spacer() 78 | } 79 | .frame(height: 200) 80 | } 81 | } 82 | .padding(.horizontal, 10) 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Examples/BlurredSheetExample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BlurredSheetExample.swift 3 | // PartialSheetExample 4 | // 5 | // Created by Rasmus Styrk on 14/08/2020. 6 | // Copyright © 2020 Swift. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | import PartialSheet 11 | 12 | struct BlurredExample: View { 13 | @State var isSheetPresented = false 14 | let iPhoneStyle = PSIphoneStyle( 15 | background: .blur(.ultraThin), 16 | handleBarStyle: .solid(.secondary), 17 | cover: .enabled(Color.black.opacity(0.4)), 18 | cornerRadius: 10 19 | ) 20 | 21 | var body: some View { 22 | VStack { 23 | Spacer() 24 | PSButton( 25 | isPresenting: $isSheetPresented, 26 | label: { 27 | Text("Display the BlurredExample Sheet") 28 | }) 29 | .padding() 30 | Spacer() 31 | HStack { 32 | Rectangle().foregroundColor(Color.blue).frame(width: 75, height: 75) 33 | Rectangle().foregroundColor(Color.green).frame(width: 75, height: 75) 34 | Rectangle().foregroundColor(Color.red).frame(width: 75, height: 75) 35 | Rectangle().foregroundColor(Color.yellow).frame(width: 75, height: 75) 36 | } 37 | } 38 | .navigationBarTitle("Blurred Example") 39 | .partialSheet(isPresented: $isSheetPresented, 40 | type: .scrollView(height: 300, showsIndicators: false), 41 | iPhoneStyle: iPhoneStyle, 42 | content: BlurredSheetView.init) 43 | } 44 | } 45 | 46 | struct BlurredExample_Previews: PreviewProvider { 47 | static var previews: some View { 48 | NavigationView { 49 | BlurredExample() 50 | } 51 | .navigationViewStyle(StackNavigationViewStyle()) 52 | .attachPartialSheetToRoot() 53 | 54 | } 55 | } 56 | 57 | struct BlurredSheetView: View { 58 | @State private var selectedStrength = 0 59 | 60 | var body: some View { 61 | VStack(alignment: .center, spacing: 20) { 62 | Text("Settings Panel").font(.headline).foregroundColor(Color.primary) 63 | Group { 64 | Text("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce vestibulum porttitor ligula quis faucibus. Maecenas auctor tincidunt maximus. Donec lectus dui, fermentum sed orci gravida, porttitor porta dui. Fusce ut diam et diam venenatis molestie vel vel augue. Mauris at mauris porta, auctor lorem et, efficitur lacus.") 65 | Text("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce vestibulum porttitor ligula quis faucibus. Maecenas auctor tincidunt maximus. Donec lectus dui, fermentum sed orci gravida, porttitor porta dui. Fusce ut diam et diam venenatis molestie vel vel augue. Mauris at mauris porta, auctor lorem et, efficitur lacus.") 66 | } 67 | .font(.subheadline).foregroundColor(Color.primary) 68 | } 69 | .padding() 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Examples/CustonAnimationExample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NormalExample.swift 3 | // PartialSheetExample 4 | // 5 | // Created by Andrea Miotto on 29/4/20. 6 | // Copyright © 2020 Swift. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | import PartialSheet 11 | 12 | struct CustonSlideAnimationExample: View { 13 | let animationIn: Animation = .interpolatingSpring(stiffness: 200, damping: 6) 14 | @State private var isSheetPresented = false 15 | 16 | var body: some View { 17 | HStack { 18 | Spacer() 19 | PSButton( 20 | isPresenting: $isSheetPresented, 21 | label: { 22 | Text("Display the Partial Sheet with a custon animation") 23 | }) 24 | .padding() 25 | Spacer() 26 | } 27 | .partialSheet(isPresented: $isSheetPresented, 28 | slideAnimation: .init(slideIn: animationIn), 29 | content: SheetView.init) 30 | .navigationBarTitle("Basic Example") 31 | .navigationViewStyle(StackNavigationViewStyle()) 32 | } 33 | } 34 | 35 | struct CustonSlideAnimationExample_Previews: PreviewProvider { 36 | static var previews: some View { 37 | NavigationView { 38 | BasicExample() 39 | } 40 | .attachPartialSheetToRoot() 41 | .navigationViewStyle(StackNavigationViewStyle()) 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Examples/DatePickerExample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DatePickerExample.swift 3 | // PartialSheetExample 4 | // 5 | // Created by Rasmus Styrk on 14/08/2020. 6 | // Copyright © 2020 Swift. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | import PartialSheet 11 | 12 | struct DatePickerExample: View { 13 | @State private var isSheetPresented = false 14 | 15 | var body: some View { 16 | HStack { 17 | Spacer() 18 | PSButton( 19 | isPresenting: $isSheetPresented, 20 | label: { 21 | Text("Display DatePicker example Sheet") 22 | }) 23 | .padding() 24 | Spacer() 25 | } 26 | .partialSheet(isPresented: $isSheetPresented, 27 | content: DatePickerSheetView.init) 28 | .navigationBarTitle("Date Picker Example") 29 | .navigationViewStyle(StackNavigationViewStyle()) 30 | } 31 | } 32 | 33 | struct DatePickerExample_Previews: PreviewProvider { 34 | static var previews: some View { 35 | NavigationView { 36 | DatePickerExample() 37 | } 38 | .attachPartialSheetToRoot() 39 | .navigationViewStyle(StackNavigationViewStyle()) 40 | } 41 | } 42 | 43 | struct DatePickerSheetView: View { 44 | @State private var date: Date = Date() 45 | 46 | var body: some View { 47 | VStack { 48 | VStack { 49 | Text("Settings Panel").font(.headline) 50 | DatePicker("Date", selection: $date) 51 | } 52 | .padding() 53 | .frame(height: 270) 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Examples/GradientSheetExample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BlurredSheetExample.swift 3 | // PartialSheetExample 4 | // 5 | // Created by Rasmus Styrk on 14/08/2020. 6 | // Copyright © 2020 Swift. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | import PartialSheet 11 | 12 | struct GradientExample: View { 13 | @State var isSheetPresented = false 14 | let iPhoneStyle = PSIphoneStyle( 15 | background: .gradient(LinearGradient(colors: [.red, .yellow], startPoint: .bottom, endPoint: .top)), 16 | handleBarStyle: .solid(.secondary), 17 | cover: .enabled(Color.black.opacity(0.4)), 18 | cornerRadius: 10 19 | ) 20 | 21 | var body: some View { 22 | VStack { 23 | Spacer() 24 | PSButton( 25 | isPresenting: $isSheetPresented, 26 | label: { 27 | Text("Display the GrdientExample Sheet") 28 | }) 29 | .padding() 30 | Spacer() 31 | } 32 | .navigationBarTitle("Gradient Example") 33 | .partialSheet(isPresented: $isSheetPresented, 34 | type: .scrollView(height: 300, showsIndicators: false), 35 | iPhoneStyle: iPhoneStyle, 36 | content: GradeintSheetView.init) 37 | } 38 | } 39 | 40 | struct GradientExample_Previews: PreviewProvider { 41 | static var previews: some View { 42 | NavigationView { 43 | BlurredExample() 44 | } 45 | .navigationViewStyle(StackNavigationViewStyle()) 46 | .attachPartialSheetToRoot() 47 | 48 | } 49 | } 50 | 51 | struct GradeintSheetView: View { 52 | @State private var selectedStrength = 0 53 | 54 | var body: some View { 55 | VStack(alignment: .center, spacing: 20) { 56 | Text("Settings Panel").font(.headline).foregroundColor(Color.primary) 57 | Group { 58 | Text("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce vestibulum porttitor ligula quis faucibus. Maecenas auctor tincidunt maximus. Donec lectus dui, fermentum sed orci gravida, porttitor porta dui. Fusce ut diam et diam venenatis molestie vel vel augue. Mauris at mauris porta, auctor lorem et, efficitur lacus.") 59 | Text("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce vestibulum porttitor ligula quis faucibus. Maecenas auctor tincidunt maximus. Donec lectus dui, fermentum sed orci gravida, porttitor porta dui. Fusce ut diam et diam venenatis molestie vel vel augue. Mauris at mauris porta, auctor lorem et, efficitur lacus.") 60 | } 61 | .font(.subheadline).foregroundColor(Color.primary) 62 | } 63 | .padding() 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Examples/HandlerBarFreeExample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HandleBarFreeExample.swift 3 | // PartialSheetExample 4 | // 5 | // Created by Gijs van Veen on 12/05/2021. 6 | // Copyright © 2021 Swift. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | import PartialSheet 11 | 12 | struct HandleBarFreeExample: View { 13 | @State private var isSheetPresented = false 14 | let iPhoneStyle = PSIphoneStyle( 15 | background: .solid(Color(uiColor: .systemBackground)), 16 | handleBarStyle: .none, 17 | cover: .enabled(Color.black.opacity(0.4)), 18 | cornerRadius: 10 19 | ) 20 | 21 | var body: some View { 22 | VStack { 23 | Spacer() 24 | PSButton( 25 | isPresenting: $isSheetPresented, 26 | label: { 27 | Text("Display the HandleBarFreeExample Sheet") 28 | }) 29 | .padding() 30 | Spacer() 31 | } 32 | .partialSheet( 33 | isPresented: $isSheetPresented, 34 | iPhoneStyle: iPhoneStyle, 35 | content: { 36 | HandleBarFreeSheetView() 37 | }) 38 | .navigationBarTitle("HandleBar Free") 39 | .navigationViewStyle(StackNavigationViewStyle()) 40 | } 41 | } 42 | 43 | struct HandleBarFreeExample_Previews: PreviewProvider { 44 | static var previews: some View { 45 | NavigationView { 46 | HandleBarFreeExample() 47 | } 48 | .attachPartialSheetToRoot() 49 | .navigationViewStyle(StackNavigationViewStyle()) 50 | } 51 | } 52 | 53 | struct HandleBarFreeSheetView: View { 54 | @State private var longer: Bool = false 55 | @State private var text: String = "some text" 56 | 57 | var body: some View { 58 | VStack(alignment: .leading, spacing: 0) { 59 | Group { 60 | HStack { 61 | Spacer() 62 | Text("Settings Panel") 63 | .font(.headline) 64 | Spacer() 65 | } 66 | 67 | Text("Vestibulum iaculis sagittis sem, vel hendrerit ex. ") 68 | .font(.body) 69 | .lineLimit(2) 70 | 71 | Toggle(isOn: self.$longer) { 72 | Text("Advanced") 73 | } 74 | } 75 | .padding(0) 76 | .frame(height: 50) 77 | if self.longer { 78 | VStack { 79 | Divider() 80 | Spacer() 81 | Text("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce vestibulum porttitor ligula quis faucibus. Maecenas auctor tincidunt maximus. Donec lectus dui, fermentum sed orci gravida, porttitor porta dui. ") 82 | Spacer() 83 | } 84 | .frame(height: 200) 85 | } 86 | } 87 | .padding(.horizontal, 10) 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Examples/ListExample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ListExample.swift 3 | // PartialSheetExample 4 | // 5 | // Created by Andrea Miotto on 29/4/20. 6 | // Copyright © 2020 Swift. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | import PartialSheet 11 | 12 | struct ListExample: View { 13 | @State private var isSheetPresented = false 14 | @State private var selectedIndex: Int = 0 15 | 16 | var body: some View { 17 | List(0...12, id: \.self) { (index) in 18 | PSButton( 19 | isPresenting: $isSheetPresented, 20 | action: { selectedIndex = index }, 21 | label: { 22 | Text("Item: \(index)") 23 | }) 24 | } 25 | .partialSheet(isPresented: $isSheetPresented, content: { 26 | Text("Item: \(selectedIndex)") 27 | .padding() 28 | }) 29 | .navigationBarTitle(Text("List Example")) 30 | } 31 | } 32 | 33 | struct ListExample_Previews: PreviewProvider { 34 | static var previews: some View { 35 | NavigationView { 36 | ListExample() 37 | } 38 | .attachPartialSheetToRoot() 39 | .navigationViewStyle(StackNavigationViewStyle()) 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Examples/PickerExample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PickerExample.swift 3 | // PartialSheetExample 4 | // 5 | // Created by Rasmus Styrk on 14/08/2020. 6 | // Copyright © 2020 Swift. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | import PartialSheet 11 | 12 | struct PickerExample: View { 13 | @State private var isSheetPresented = false 14 | 15 | var body: some View { 16 | HStack { 17 | Spacer() 18 | PSButton( 19 | isPresenting: $isSheetPresented, 20 | label: { 21 | Text("Display the PickerExample Sheet") 22 | }) 23 | .padding() 24 | Spacer() 25 | } 26 | .partialSheet(isPresented: $isSheetPresented, 27 | content: PickerSheetView.init) 28 | .navigationBarTitle("Picker Example") 29 | .navigationViewStyle(StackNavigationViewStyle()) 30 | } 31 | } 32 | 33 | struct PickerExample_Previews: PreviewProvider { 34 | static var previews: some View { 35 | NavigationView { 36 | PickerExample() 37 | } 38 | .attachPartialSheetToRoot() 39 | .navigationViewStyle(StackNavigationViewStyle()) 40 | } 41 | } 42 | 43 | struct PickerSheetView: View { 44 | var strengths = ["Low", "Medium", "High"] 45 | @State private var selectedStrength = 0 46 | 47 | var body: some View { 48 | VStack { 49 | VStack { 50 | Text("Settings Panel").font(.headline) 51 | Spacer() 52 | Text("Wheel Picker").font(.callout) 53 | Picker(selection: $selectedStrength, label: EmptyView()) { 54 | ForEach(0 ..< strengths.count) { 55 | Text(self.strengths[$0]) 56 | .font(.callout) 57 | } 58 | } 59 | .pickerStyle(.wheel) 60 | .frame(height: 100) 61 | .clipped(antialiased: true) 62 | .padding(1) 63 | .background( 64 | RoundedRectangle(cornerRadius: 5) 65 | .fill(.clear) 66 | .border(Color.gray) 67 | ) 68 | Spacer() 69 | Text("Inline Picker").font(.callout) 70 | Picker(selection: $selectedStrength, label: EmptyView()) { 71 | ForEach(0 ..< strengths.count) { 72 | Text(self.strengths[$0]) 73 | .font(.callout) 74 | } 75 | } 76 | Spacer() 77 | } 78 | .padding() 79 | .frame(height: 350) 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Examples/PushNavigationExample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PushNavigationExample.swift 3 | // PartialSheetExample 4 | // 5 | // Created by Andrea Miotto on 29/4/20. 6 | // Copyright © 2020 Swift. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | import PartialSheet 11 | 12 | struct PushNavigationExample: View { 13 | @State private var isSheetPresented = false 14 | @State var showNextView: Bool = false 15 | 16 | var body: some View { 17 | ZStack { 18 | NavigationLink(destination: Text("Destination View"), isActive: $showNextView, label: {EmptyView()}) 19 | PSButton( 20 | isPresenting: $isSheetPresented, 21 | label: { 22 | Text("Show Partial Sheet") 23 | }) 24 | } 25 | .partialSheet(isPresented: $isSheetPresented, content: { 26 | Button(action: { 27 | isSheetPresented = false 28 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.33) { 29 | self.showNextView = true 30 | } 31 | }, label: { 32 | Text("Navigation Link") 33 | }) 34 | .padding() 35 | }) 36 | .navigationBarTitle(Text("Push Navigation")) 37 | } 38 | } 39 | 40 | struct PushNavigationExample_Previews: PreviewProvider { 41 | static var previews: some View { 42 | NavigationView { 43 | PushNavigationExample() 44 | } 45 | .attachPartialSheetToRoot() 46 | .navigationViewStyle(StackNavigationViewStyle()) 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Examples/ScrollViewExample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NormalExample.swift 3 | // PartialSheetExample 4 | // 5 | // Created by Andrea Miotto on 29/4/20. 6 | // Copyright © 2020 Swift. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | import PartialSheet 11 | 12 | struct ScrollViewExample: View { 13 | @State private var isSheetPresented = false 14 | 15 | var body: some View { 16 | HStack { 17 | Spacer() 18 | PSButton( 19 | isPresenting: $isSheetPresented, 20 | label: { 21 | Text("Display the Partial Sheet") 22 | }) 23 | .padding() 24 | Spacer() 25 | } 26 | .partialSheet(isPresented: $isSheetPresented, 27 | type: .scrollView(height: 300, showsIndicators: false), 28 | content: ScrollableSheetView.init) 29 | .navigationBarTitle("Basic Example") 30 | .navigationViewStyle(StackNavigationViewStyle()) 31 | } 32 | } 33 | 34 | struct ScrollViewExample_Previews: PreviewProvider { 35 | static var previews: some View { 36 | NavigationView { 37 | ScrollViewExample() 38 | } 39 | .attachPartialSheetToRoot() 40 | .navigationViewStyle(StackNavigationViewStyle()) 41 | } 42 | } 43 | 44 | struct ScrollableSheetView: View { 45 | var body: some View { 46 | VStack(alignment: .leading, spacing: 20) { 47 | HStack { 48 | Spacer() 49 | Text("Privacy Policy") 50 | .font(.headline) 51 | Spacer() 52 | } 53 | Text("Vestibulum iaculis sagittis sem, vel hendrerit ex. ") 54 | .font(.body) 55 | .lineLimit(2) 56 | Divider() 57 | Text(""" 58 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce vestibulum porttitor ligula quis faucibus. Maecenas auctor tincidunt maximus. Donec lectus dui, fermentum sed orci gravida, porttitor porta dui. 59 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce vestibulum porttitor ligula quis faucibus. Maecenas auctor tincidunt maximus. Donec lectus dui, fermentum sed orci gravida, porttitor porta dui. 60 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce vestibulum porttitor ligula quis faucibus. Maecenas auctor tincidunt maximus. Donec lectus dui, fermentum sed orci gravida, porttitor porta dui. 61 | """) 62 | Spacer() 63 | .frame(height: 50) 64 | } 65 | .padding(.horizontal, 10) 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/Examples/TextfieldExample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TextfieldExample.swift 3 | // PartialSheetExample 4 | // 5 | // Created by Andrea Miotto on 29/4/20. 6 | // Copyright © 2020 Swift. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | import PartialSheet 11 | 12 | struct TextfieldExample: View { 13 | @State private var isSheetPresented = false 14 | 15 | var body: some View { 16 | HStack { 17 | Spacer() 18 | PSButton( 19 | isPresenting: $isSheetPresented, 20 | label: { 21 | Text("Display the Partial Shehet") 22 | }) 23 | .padding() 24 | Spacer() 25 | } 26 | .partialSheet(isPresented: $isSheetPresented, content: { 27 | SheetTextFieldView() 28 | }) 29 | .navigationBarTitle("TextField Example") 30 | .navigationViewStyle(StackNavigationViewStyle()) 31 | } 32 | } 33 | 34 | struct TextfieldExample_Previews: PreviewProvider { 35 | static var previews: some View { 36 | NavigationView { 37 | TextfieldExample() 38 | } 39 | .attachPartialSheetToRoot() 40 | .navigationViewStyle(StackNavigationViewStyle()) 41 | } 42 | } 43 | 44 | struct SheetTextFieldView: View { 45 | @State private var longer: Bool = false 46 | @State private var text: String = "" 47 | 48 | var body: some View { 49 | VStack { 50 | VStack(alignment: .center, spacing: 10) { 51 | Text("Settings Panel") 52 | .font(.headline) 53 | TextField("Name & Surname", text: self.$text) 54 | .textFieldStyle(.roundedBorder) 55 | Toggle(isOn: self.$longer) { 56 | Text("Advanced") 57 | } 58 | } 59 | .padding() 60 | if self.longer { 61 | VStack(alignment: .leading, spacing: 10) { 62 | Text("More info...") 63 | .font(.body) 64 | TextField("Address", text: .constant("Address")) 65 | .textFieldStyle(.roundedBorder) 66 | Spacer() 67 | } 68 | .padding() 69 | } 70 | } 71 | .frame(height: self.longer ? 250 : 150) 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /PartialSheet-Example/Shared/PartialSheet_ExampleApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PartialSheet_ExampleApp.swift 3 | // Shared 4 | // 5 | // Created by Andrea Miotto on 26/02/22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct PartialSheet_ExampleApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 |

5 | 6 | 7 | 8 | 9 |

10 | 11 | # PartialSheet 12 | 13 | **Deprecated: The owner has no more time to maantain this project.** 14 | 15 | A custom SwiftUI modifier to present a Partial Modal Sheet based on his content size. 16 | 17 | **Version 3.0 has been released, there are a lot of breaking changes, make sure to read the guide before update!** 18 | 19 | ## Index 20 | 21 | - [Features](#features) 22 | - [Version 3](#version-3) 23 | - [Installation](#installation) 24 | - [How To Use](#how-to-use) 25 | - [Wiki - Full Guide](https://github.com/AndreaMiotto/PartialSheet/wiki) 26 | - [Version 2](#version-2) 27 | 28 | 29 | ## iPhone Preview 30 | 31 | | Dynamic Height | Scrollable Content | Pickers Compatible 32 | --|--|-- 33 |