├── .gitattributes ├── img ├── drag.gif ├── basic.gif ├── backdismiss.gif ├── dragdismiss.gif └── dragrestore.gif ├── DrawerView ├── DrawerView-SwiftUI │ ├── Assets.xcassets │ │ ├── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ ├── SampleDrawerInnerView.swift │ ├── ContentView.swift │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── LaunchScreen.storyboard │ ├── Info.plist │ ├── SceneDelegate.swift │ └── DrawerView.swift └── DrawerView-Demo.xcodeproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── project.pbxproj ├── LICENSE ├── .gitignore └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /img/drag.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/totoroyyb/DrawerView-SwiftUI/HEAD/img/drag.gif -------------------------------------------------------------------------------- /img/basic.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/totoroyyb/DrawerView-SwiftUI/HEAD/img/basic.gif -------------------------------------------------------------------------------- /img/backdismiss.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/totoroyyb/DrawerView-SwiftUI/HEAD/img/backdismiss.gif -------------------------------------------------------------------------------- /img/dragdismiss.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/totoroyyb/DrawerView-SwiftUI/HEAD/img/dragdismiss.gif -------------------------------------------------------------------------------- /img/dragrestore.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/totoroyyb/DrawerView-SwiftUI/HEAD/img/dragrestore.gif -------------------------------------------------------------------------------- /DrawerView/DrawerView-SwiftUI/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /DrawerView/DrawerView-SwiftUI/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /DrawerView/DrawerView-Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /DrawerView/DrawerView-Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /DrawerView/DrawerView-SwiftUI/SampleDrawerInnerView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SampleDrawerInnerView.swift 3 | // DrawerView 4 | // 5 | // Created by Quentin on 2019/8/17. 6 | // Copyright © 2019 Quentin. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct SampleDrawerInnerView: View { 12 | var body: some View { 13 | VStack { 14 | Spacer() 15 | 16 | Text("This is the inner drawer view") 17 | 18 | Spacer() 19 | } 20 | } 21 | } 22 | 23 | #if DEBUG 24 | struct SampleDrawerInnerView_Previews: PreviewProvider { 25 | static var previews: some View { 26 | SampleDrawerInnerView() 27 | } 28 | } 29 | #endif 30 | -------------------------------------------------------------------------------- /DrawerView/DrawerView-SwiftUI/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // BottomDrawerView 4 | // 5 | // Created by Quentin on 2019/8/8. 6 | // Copyright © 2019 Quentin. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct ContentView: View { 12 | @State private var isShow = false 13 | 14 | var body: some View { 15 | VStack { 16 | Text("This is a bottom drawer view demo") 17 | Button(action: { 18 | self.isShow.toggle() 19 | }) { 20 | Text("Click to present") 21 | } 22 | 23 | Spacer() 24 | } 25 | .frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity) 26 | .background(Color.red) 27 | .overlay( 28 | DrawerView(isShow: $isShow, content: SampleDrawerInnerView()) 29 | ) 30 | } 31 | } 32 | 33 | #if DEBUG 34 | struct ContentView_Previews: PreviewProvider { 35 | static var previews: some View { 36 | ContentView() 37 | } 38 | } 39 | #endif 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 TotoroQ 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 | -------------------------------------------------------------------------------- /DrawerView/DrawerView-SwiftUI/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // BottomDrawerView 4 | // 5 | // Created by Quentin on 2019/8/8. 6 | // Copyright © 2019 Quentin. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /DrawerView/DrawerView-SwiftUI/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /DrawerView/DrawerView-SwiftUI/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /DrawerView/DrawerView-SwiftUI/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | UISceneConfigurations 28 | 29 | UIWindowSceneSessionRoleApplication 30 | 31 | 32 | UISceneConfigurationName 33 | Default Configuration 34 | UISceneDelegateClassName 35 | $(PRODUCT_MODULE_NAME).SceneDelegate 36 | 37 | 38 | 39 | 40 | UILaunchStoryboardName 41 | LaunchScreen 42 | UIRequiredDeviceCapabilities 43 | 44 | armv7 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | UISupportedInterfaceOrientations~ipad 53 | 54 | UIInterfaceOrientationPortrait 55 | UIInterfaceOrientationPortraitUpsideDown 56 | UIInterfaceOrientationLandscapeLeft 57 | UIInterfaceOrientationLandscapeRight 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | *.DS_Store 6 | 7 | ## Build generated 8 | build/ 9 | DerivedData/ 10 | 11 | ## Various settings 12 | *.pbxuser 13 | !default.pbxuser 14 | *.mode1v3 15 | !default.mode1v3 16 | *.mode2v3 17 | !default.mode2v3 18 | *.perspectivev3 19 | !default.perspectivev3 20 | xcuserdata/ 21 | 22 | ## Other 23 | *.moved-aside 24 | *.xccheckout 25 | *.xcscmblueprint 26 | 27 | ## Obj-C/Swift specific 28 | *.hmap 29 | *.ipa 30 | *.dSYM.zip 31 | *.dSYM 32 | 33 | ## Playgrounds 34 | timeline.xctimeline 35 | playground.xcworkspace 36 | 37 | # Swift Package Manager 38 | # 39 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 40 | # Packages/ 41 | # Package.pins 42 | # Package.resolved 43 | .build/ 44 | 45 | # CocoaPods 46 | # 47 | # We recommend against adding the Pods directory to your .gitignore. However 48 | # you should judge for yourself, the pros and cons are mentioned at: 49 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 50 | # 51 | # Pods/ 52 | # 53 | # Add this line if you want to avoid checking in source code from the Xcode workspace 54 | # *.xcworkspace 55 | 56 | # Carthage 57 | # 58 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 59 | # Carthage/Checkouts 60 | 61 | Carthage/Build 62 | 63 | # Accio dependency management 64 | Dependencies/ 65 | .accio/ 66 | 67 | # fastlane 68 | # 69 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 70 | # screenshots whenever they are needed. 71 | # For more information about the recommended setup visit: 72 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 73 | 74 | fastlane/report.xml 75 | fastlane/Preview.html 76 | fastlane/screenshots/**/*.png 77 | fastlane/test_output 78 | 79 | # Code Injection 80 | # 81 | # After new code Injection tools there's a generated folder /iOSInjectionProject 82 | # https://github.com/johnno1962/injectionforxcode 83 | 84 | iOSInjectionProject/ 85 | -------------------------------------------------------------------------------- /DrawerView/DrawerView-SwiftUI/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // BottomDrawerView 4 | // 5 | // Created by Quentin on 2019/8/8. 6 | // Copyright © 2019 Quentin. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SwiftUI 11 | 12 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 18 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 19 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 20 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 21 | 22 | // Use a UIHostingController as window root view controller 23 | if let windowScene = scene as? UIWindowScene { 24 | let window = UIWindow(windowScene: windowScene) 25 | window.rootViewController = UIHostingController(rootView: ContentView()) 26 | self.window = window 27 | window.makeKeyAndVisible() 28 | } 29 | } 30 | 31 | func sceneDidDisconnect(_ scene: UIScene) { 32 | // Called as the scene is being released by the system. 33 | // This occurs shortly after the scene enters the background, or when its session is discarded. 34 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 35 | // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). 36 | } 37 | 38 | func sceneDidBecomeActive(_ scene: UIScene) { 39 | // Called when the scene has moved from an inactive state to an active state. 40 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 41 | } 42 | 43 | func sceneWillResignActive(_ scene: UIScene) { 44 | // Called when the scene will move from an active state to an inactive state. 45 | // This may occur due to temporary interruptions (ex. an incoming phone call). 46 | } 47 | 48 | func sceneWillEnterForeground(_ scene: UIScene) { 49 | // Called as the scene transitions from the background to the foreground. 50 | // Use this method to undo the changes made on entering the background. 51 | } 52 | 53 | func sceneDidEnterBackground(_ scene: UIScene) { 54 | // Called as the scene transitions from the foreground to the background. 55 | // Use this method to save data, release shared resources, and store enough scene-specific state information 56 | // to restore the scene back to its current state. 57 | } 58 | 59 | 60 | } 61 | 62 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DrawerView-SwiftUI 2 | 3 | **A drawer view implemented by SwiftUI. This is not just simply a demo, instead, it can be directly used in project as a module as it has rudimentary customization flexibility.** 4 | 5 | ## To-Dos 6 | - [ ] Fix the computed property error 7 | 8 | ## Introduction & Demo 9 | 10 | ### Basic Functionality Demo 11 | 12 | *A drawer with some bouncing animation* 13 | 14 | 15 | 16 | 17 | 18 | ### Further Step 19 | 20 | #### Click Anywhere of the Background to Dismiss DrawerView 21 | 22 | You can click anywhere of the darken background to dismiss the DrawerView 23 | 24 | 25 | 26 | #### Drag to Dismiss DrawerView 27 | 28 | * You can drag the draggable area to dismiss the DrawerView 29 | 30 | 31 | 32 | * However, if the translation of drag action is shorter than you want, you can still restore the DrawerView. 33 | 34 | 35 | 36 | * Actually, you can even drag it up if you want. You can modify this behavior in the code. 37 | 38 | 39 | 40 | ## Usage 41 | 42 | The entire `DrawerView` is coded in the file with the same name as `DrawerView.swift`. The setup code written in `Content.swift` which demonstrates how to use `DrawerView.swift`. 43 | 44 | *`DrawerView` takes one required argument `isShow` to open and dismiss itself. You need to create one in your main view and bind it to `DrawerView`* 45 | 46 | * Use `DrawerView` as `overlay` 47 | 48 | The code provided in the `Content.swift` uses `DrawerView` as a `overlay` of the main view. 49 | 50 | ``` swift 51 | VStack { 52 | // Create your own main view 53 | } 54 | .overlay( 55 | DrawerView(isShow: $isShow, content: SampleInnerView()) 56 | ) 57 | ``` 58 | 59 | * Use `DrawerView` in `ZStack` 60 | 61 | ``` swift 62 | ZStack { 63 | VStack { 64 | // Create your own main view 65 | } 66 | 67 | DrawerView(isShow: $isShow, content: SampleInnerView()) 68 | } 69 | ``` 70 | 71 | *In the above code, `content` is the inner view of `DrawerView`.* 72 | 73 | *For example:* 74 | 75 | ``` sw 76 | // file: SampleInnerView.swift 77 | struct SampleInnerView: View { 78 | var body: some View { 79 | Text("This is the inner view of DrawerView") 80 | } 81 | } 82 | ``` 83 | 84 | 85 | 86 | ## Customization 87 | 88 | *All customizable properties have been provided in the `DrawerView.swift`. You can directly assign the preferred value to these variables when you initialize the `DrawerView`* 89 | 90 | * `backLayerColor` 91 | 92 | * `backLayerOpacity` 93 | 94 | * `backLayerAnimation` 95 | 96 | * `drawerOrientation` 97 | 98 | * `drawerHeight` 99 | 100 | * `drawerWidth` 101 | 102 | * `drawerCornerRadius` 103 | 104 | * `drawerBackgroundColor` 105 | 106 | * `drawerOutAnimation` 107 | 108 | * `isDrawerShadowEnable` 109 | 110 | * `drawerShadowRadius` 111 | 112 | *If you want to customize this property, you need to set `isDrawerShadowEnable` to `true` first. By default, the animation of shadow is suppressed, but you can change it in source file.* 113 | 114 | * `content` 115 | 116 | *This is property is required in the initializer. You can assign the view you want.* 117 | 118 | * **To Be Continued** 119 | 120 | ## Contribution 121 | 122 | This project is for demonstration purpose. Any contribution is welcome! 123 | 124 | **Best Luck and Happy Coding!** 125 | 126 | -------------------------------------------------------------------------------- /DrawerView/DrawerView-SwiftUI/DrawerView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BottomDrawerView.swift 3 | // BottomDrawerView 4 | // 5 | // Created by Quentin on 2019/8/8. 6 | // Copyright © 2019 Quentin. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct DrawerView: View { 12 | @Binding var isShow: Bool 13 | 14 | @State private var translation = CGSize.zero 15 | 16 | // The default color of back layer 17 | var backLayerColor = Color.black 18 | 19 | // The default opacity of back layer when the drawer is pulled out 20 | var backLayerOpacity = 0.5 21 | 22 | // Use the default animation of back layer 23 | var backLayerAnimation = Animation.default 24 | 25 | // The default orientation of drawer 26 | var drawerOrientation = Axis.Set.vertical 27 | 28 | // The default height of drawer 29 | // Will be used when orientation set to be VERTICAL 30 | var drawerHeight: CGFloat? 31 | 32 | private var computedDrawerHeight: CGFloat { 33 | if let height = drawerHeight { 34 | return height 35 | } 36 | return UIScreen.main.bounds.height / 2 37 | } 38 | 39 | // The default width of drawer 40 | // Will be used when orientation set to be HORIZANTAL 41 | var drawerWidth: CGFloat? 42 | 43 | private var computedDrawerWidth: CGFloat { 44 | if let width = drawerWidth { 45 | return width 46 | } 47 | return UIScreen.main.bounds.width / 2 48 | } 49 | 50 | // The default value of corner radius of drawer view 51 | var drawerCornerRadius: CGFloat = 20 52 | 53 | // The default color of the background of drawer view 54 | var drawerBackgroundColor = Color.blue 55 | 56 | // The default animation of opening up drawer view 57 | var drawerOutAnimation = Animation.interpolatingSpring(mass: 0.5, stiffness: 45, damping: 45, initialVelocity: 15) 58 | 59 | var isDrawerShadowEnable = true 60 | 61 | var drawerShadowRadius: CGFloat = 20 62 | 63 | var content: Content 64 | 65 | private var xOffset: CGFloat { 66 | if drawerOrientation == Axis.Set.horizontal { 67 | let origOffset = isShow ? -(UIScreen.main.bounds.width - computedDrawerWidth) / 2 : -(UIScreen.main.bounds.width + computedDrawerWidth) / 2 68 | return origOffset - translation.width 69 | } 70 | return 0 71 | } 72 | 73 | private var initYOffset: CGFloat? { 74 | if drawerOrientation == Axis.Set.vertical { 75 | return isShow ? (UIScreen.main.bounds.height - computedDrawerHeight ) / 2 : (UIScreen.main.bounds.height + computedDrawerHeight ) / 2 76 | } 77 | return nil 78 | } 79 | 80 | private var yOffset: CGFloat { 81 | if let y = initYOffset { 82 | return y + translation.height 83 | } 84 | return 0 85 | } 86 | 87 | var body: some View { 88 | ZStack { 89 | // Implement the darken background 90 | if isShow { 91 | Rectangle() 92 | .foregroundColor(backLayerColor) 93 | .opacity(backLayerOpacity) 94 | .animation(backLayerAnimation) 95 | .onTapGesture { 96 | // The default behavior of tapping on 97 | // the back layer is dismissing the drawer 98 | self.isShow.toggle() 99 | } 100 | } 101 | 102 | VStack { 103 | // The inner content of the drawer 104 | // Be creative! 105 | VStack { 106 | Text("This is a draggable area") 107 | } 108 | .frame(minWidth: 0, maxWidth: .infinity) 109 | .frame(height: 40) 110 | .background( 111 | RoundedRectangle(cornerRadius: drawerCornerRadius) 112 | .stroke(lineWidth: 1) 113 | ) 114 | .gesture( 115 | DragGesture() 116 | .onChanged { (value) in 117 | self.translation = value.translation 118 | } 119 | .onEnded { (value) in 120 | switch self.drawerOrientation { 121 | case Axis.Set.vertical: 122 | if value.translation.height > 20 { 123 | self.isShow.toggle() 124 | } 125 | 126 | case Axis.Set.horizontal: 127 | if value.translation.width < -20 { 128 | self.isShow.toggle() 129 | } 130 | default: 131 | break 132 | } 133 | self.translation = CGSize.zero 134 | } 135 | ) 136 | 137 | content 138 | } 139 | .frame( 140 | width: drawerOrientation == Axis.Set.horizontal 141 | ? computedDrawerWidth 142 | : UIScreen.main.bounds.width, 143 | height: drawerOrientation == Axis.Set.vertical 144 | ? computedDrawerHeight 145 | : UIScreen.main.bounds.height) 146 | .background(drawerBackgroundColor) 147 | .cornerRadius(drawerCornerRadius) 148 | .shadow(radius: isDrawerShadowEnable ? drawerShadowRadius : 0) 149 | .offset(x: xOffset, y: yOffset) 150 | .animation(drawerOutAnimation) 151 | } 152 | .edgesIgnoringSafeArea(.all) 153 | } 154 | } 155 | 156 | #if DEBUG 157 | struct BottomDrawerView_Previews: PreviewProvider { 158 | static var previews: some View { 159 | Group { 160 | DrawerView(isShow: .constant(false), content: SampleDrawerInnerView()) 161 | .previewDisplayName("Drawer is Closed, Vertical") 162 | 163 | DrawerView(isShow: .constant(true), content: SampleDrawerInnerView()) 164 | .previewDisplayName("Drawer is Opened, Vertical") 165 | 166 | // DrawerView(isShow: .constant(false), drawerOrientation: Axis.Set.horizontal) 167 | // .previewDisplayName("Drawer is Closed, Horizontal") 168 | // 169 | // DrawerView(isShow: .constant(true), drawerOrientation: Axis.Set.horizontal) 170 | // .previewDisplayName("Drawer is Opened, Horizontal") 171 | } 172 | } 173 | } 174 | #endif 175 | -------------------------------------------------------------------------------- /DrawerView/DrawerView-Demo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 214B504722FB3319000FEB3E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 214B504622FB3319000FEB3E /* AppDelegate.swift */; }; 11 | 214B504922FB3319000FEB3E /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 214B504822FB3319000FEB3E /* SceneDelegate.swift */; }; 12 | 214B504B22FB3319000FEB3E /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 214B504A22FB3319000FEB3E /* ContentView.swift */; }; 13 | 214B504D22FB331C000FEB3E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 214B504C22FB331C000FEB3E /* Assets.xcassets */; }; 14 | 214B505022FB331C000FEB3E /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 214B504F22FB331C000FEB3E /* Preview Assets.xcassets */; }; 15 | 214B505322FB331C000FEB3E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 214B505122FB331C000FEB3E /* LaunchScreen.storyboard */; }; 16 | 214B505B22FB338B000FEB3E /* DrawerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 214B505A22FB338B000FEB3E /* DrawerView.swift */; }; 17 | 21B701AB2308224B00500E28 /* SampleDrawerInnerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21B701AA2308224B00500E28 /* SampleDrawerInnerView.swift */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXFileReference section */ 21 | 214B504322FB3319000FEB3E /* DrawerView-Demo-SwiftUI.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "DrawerView-Demo-SwiftUI.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | 214B504622FB3319000FEB3E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 23 | 214B504822FB3319000FEB3E /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 24 | 214B504A22FB3319000FEB3E /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 25 | 214B504C22FB331C000FEB3E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 26 | 214B504F22FB331C000FEB3E /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 27 | 214B505222FB331C000FEB3E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 28 | 214B505422FB331C000FEB3E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 29 | 214B505A22FB338B000FEB3E /* DrawerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DrawerView.swift; sourceTree = ""; }; 30 | 21B701AA2308224B00500E28 /* SampleDrawerInnerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleDrawerInnerView.swift; sourceTree = ""; }; 31 | /* End PBXFileReference section */ 32 | 33 | /* Begin PBXFrameworksBuildPhase section */ 34 | 214B504022FB3319000FEB3E /* Frameworks */ = { 35 | isa = PBXFrameworksBuildPhase; 36 | buildActionMask = 2147483647; 37 | files = ( 38 | ); 39 | runOnlyForDeploymentPostprocessing = 0; 40 | }; 41 | /* End PBXFrameworksBuildPhase section */ 42 | 43 | /* Begin PBXGroup section */ 44 | 214B503A22FB3319000FEB3E = { 45 | isa = PBXGroup; 46 | children = ( 47 | 214B504522FB3319000FEB3E /* DrawerView-SwiftUI */, 48 | 214B504422FB3319000FEB3E /* Products */, 49 | ); 50 | sourceTree = ""; 51 | }; 52 | 214B504422FB3319000FEB3E /* Products */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | 214B504322FB3319000FEB3E /* DrawerView-Demo-SwiftUI.app */, 56 | ); 57 | name = Products; 58 | sourceTree = ""; 59 | }; 60 | 214B504522FB3319000FEB3E /* DrawerView-SwiftUI */ = { 61 | isa = PBXGroup; 62 | children = ( 63 | 214B504622FB3319000FEB3E /* AppDelegate.swift */, 64 | 214B504822FB3319000FEB3E /* SceneDelegate.swift */, 65 | 214B504A22FB3319000FEB3E /* ContentView.swift */, 66 | 214B505A22FB338B000FEB3E /* DrawerView.swift */, 67 | 21B701AA2308224B00500E28 /* SampleDrawerInnerView.swift */, 68 | 214B504C22FB331C000FEB3E /* Assets.xcassets */, 69 | 214B505122FB331C000FEB3E /* LaunchScreen.storyboard */, 70 | 214B505422FB331C000FEB3E /* Info.plist */, 71 | 214B504E22FB331C000FEB3E /* Preview Content */, 72 | ); 73 | path = "DrawerView-SwiftUI"; 74 | sourceTree = ""; 75 | }; 76 | 214B504E22FB331C000FEB3E /* Preview Content */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | 214B504F22FB331C000FEB3E /* Preview Assets.xcassets */, 80 | ); 81 | path = "Preview Content"; 82 | sourceTree = ""; 83 | }; 84 | /* End PBXGroup section */ 85 | 86 | /* Begin PBXNativeTarget section */ 87 | 214B504222FB3319000FEB3E /* DrawerView-Demo */ = { 88 | isa = PBXNativeTarget; 89 | buildConfigurationList = 214B505722FB331C000FEB3E /* Build configuration list for PBXNativeTarget "DrawerView-Demo" */; 90 | buildPhases = ( 91 | 214B503F22FB3319000FEB3E /* Sources */, 92 | 214B504022FB3319000FEB3E /* Frameworks */, 93 | 214B504122FB3319000FEB3E /* Resources */, 94 | ); 95 | buildRules = ( 96 | ); 97 | dependencies = ( 98 | ); 99 | name = "DrawerView-Demo"; 100 | productName = BottomDrawerView; 101 | productReference = 214B504322FB3319000FEB3E /* DrawerView-Demo-SwiftUI.app */; 102 | productType = "com.apple.product-type.application"; 103 | }; 104 | /* End PBXNativeTarget section */ 105 | 106 | /* Begin PBXProject section */ 107 | 214B503B22FB3319000FEB3E /* Project object */ = { 108 | isa = PBXProject; 109 | attributes = { 110 | LastSwiftUpdateCheck = 1100; 111 | LastUpgradeCheck = 1100; 112 | ORGANIZATIONNAME = Quentin; 113 | TargetAttributes = { 114 | 214B504222FB3319000FEB3E = { 115 | CreatedOnToolsVersion = 11.0; 116 | }; 117 | }; 118 | }; 119 | buildConfigurationList = 214B503E22FB3319000FEB3E /* Build configuration list for PBXProject "DrawerView-Demo" */; 120 | compatibilityVersion = "Xcode 9.3"; 121 | developmentRegion = en; 122 | hasScannedForEncodings = 0; 123 | knownRegions = ( 124 | en, 125 | Base, 126 | ); 127 | mainGroup = 214B503A22FB3319000FEB3E; 128 | productRefGroup = 214B504422FB3319000FEB3E /* Products */; 129 | projectDirPath = ""; 130 | projectRoot = ""; 131 | targets = ( 132 | 214B504222FB3319000FEB3E /* DrawerView-Demo */, 133 | ); 134 | }; 135 | /* End PBXProject section */ 136 | 137 | /* Begin PBXResourcesBuildPhase section */ 138 | 214B504122FB3319000FEB3E /* Resources */ = { 139 | isa = PBXResourcesBuildPhase; 140 | buildActionMask = 2147483647; 141 | files = ( 142 | 214B505322FB331C000FEB3E /* LaunchScreen.storyboard in Resources */, 143 | 214B505022FB331C000FEB3E /* Preview Assets.xcassets in Resources */, 144 | 214B504D22FB331C000FEB3E /* Assets.xcassets in Resources */, 145 | ); 146 | runOnlyForDeploymentPostprocessing = 0; 147 | }; 148 | /* End PBXResourcesBuildPhase section */ 149 | 150 | /* Begin PBXSourcesBuildPhase section */ 151 | 214B503F22FB3319000FEB3E /* Sources */ = { 152 | isa = PBXSourcesBuildPhase; 153 | buildActionMask = 2147483647; 154 | files = ( 155 | 214B504722FB3319000FEB3E /* AppDelegate.swift in Sources */, 156 | 21B701AB2308224B00500E28 /* SampleDrawerInnerView.swift in Sources */, 157 | 214B504922FB3319000FEB3E /* SceneDelegate.swift in Sources */, 158 | 214B505B22FB338B000FEB3E /* DrawerView.swift in Sources */, 159 | 214B504B22FB3319000FEB3E /* ContentView.swift in Sources */, 160 | ); 161 | runOnlyForDeploymentPostprocessing = 0; 162 | }; 163 | /* End PBXSourcesBuildPhase section */ 164 | 165 | /* Begin PBXVariantGroup section */ 166 | 214B505122FB331C000FEB3E /* LaunchScreen.storyboard */ = { 167 | isa = PBXVariantGroup; 168 | children = ( 169 | 214B505222FB331C000FEB3E /* Base */, 170 | ); 171 | name = LaunchScreen.storyboard; 172 | sourceTree = ""; 173 | }; 174 | /* End PBXVariantGroup section */ 175 | 176 | /* Begin XCBuildConfiguration section */ 177 | 214B505522FB331C000FEB3E /* Debug */ = { 178 | isa = XCBuildConfiguration; 179 | buildSettings = { 180 | ALWAYS_SEARCH_USER_PATHS = NO; 181 | CLANG_ANALYZER_NONNULL = YES; 182 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 183 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 184 | CLANG_CXX_LIBRARY = "libc++"; 185 | CLANG_ENABLE_MODULES = YES; 186 | CLANG_ENABLE_OBJC_ARC = YES; 187 | CLANG_ENABLE_OBJC_WEAK = YES; 188 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 189 | CLANG_WARN_BOOL_CONVERSION = YES; 190 | CLANG_WARN_COMMA = YES; 191 | CLANG_WARN_CONSTANT_CONVERSION = YES; 192 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 193 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 194 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 195 | CLANG_WARN_EMPTY_BODY = YES; 196 | CLANG_WARN_ENUM_CONVERSION = YES; 197 | CLANG_WARN_INFINITE_RECURSION = YES; 198 | CLANG_WARN_INT_CONVERSION = YES; 199 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 200 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 201 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 202 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 203 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 204 | CLANG_WARN_STRICT_PROTOTYPES = YES; 205 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 206 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 207 | CLANG_WARN_UNREACHABLE_CODE = YES; 208 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 209 | COPY_PHASE_STRIP = NO; 210 | DEBUG_INFORMATION_FORMAT = dwarf; 211 | ENABLE_STRICT_OBJC_MSGSEND = YES; 212 | ENABLE_TESTABILITY = YES; 213 | GCC_C_LANGUAGE_STANDARD = gnu11; 214 | GCC_DYNAMIC_NO_PIC = NO; 215 | GCC_NO_COMMON_BLOCKS = YES; 216 | GCC_OPTIMIZATION_LEVEL = 0; 217 | GCC_PREPROCESSOR_DEFINITIONS = ( 218 | "DEBUG=1", 219 | "$(inherited)", 220 | ); 221 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 222 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 223 | GCC_WARN_UNDECLARED_SELECTOR = YES; 224 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 225 | GCC_WARN_UNUSED_FUNCTION = YES; 226 | GCC_WARN_UNUSED_VARIABLE = YES; 227 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 228 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 229 | MTL_FAST_MATH = YES; 230 | ONLY_ACTIVE_ARCH = YES; 231 | SDKROOT = iphoneos; 232 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 233 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 234 | }; 235 | name = Debug; 236 | }; 237 | 214B505622FB331C000FEB3E /* Release */ = { 238 | isa = XCBuildConfiguration; 239 | buildSettings = { 240 | ALWAYS_SEARCH_USER_PATHS = NO; 241 | CLANG_ANALYZER_NONNULL = YES; 242 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 243 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 244 | CLANG_CXX_LIBRARY = "libc++"; 245 | CLANG_ENABLE_MODULES = YES; 246 | CLANG_ENABLE_OBJC_ARC = YES; 247 | CLANG_ENABLE_OBJC_WEAK = YES; 248 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 249 | CLANG_WARN_BOOL_CONVERSION = YES; 250 | CLANG_WARN_COMMA = YES; 251 | CLANG_WARN_CONSTANT_CONVERSION = YES; 252 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 253 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 254 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 255 | CLANG_WARN_EMPTY_BODY = YES; 256 | CLANG_WARN_ENUM_CONVERSION = YES; 257 | CLANG_WARN_INFINITE_RECURSION = YES; 258 | CLANG_WARN_INT_CONVERSION = YES; 259 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 260 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 261 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 262 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 263 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 264 | CLANG_WARN_STRICT_PROTOTYPES = YES; 265 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 266 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 267 | CLANG_WARN_UNREACHABLE_CODE = YES; 268 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 269 | COPY_PHASE_STRIP = NO; 270 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 271 | ENABLE_NS_ASSERTIONS = NO; 272 | ENABLE_STRICT_OBJC_MSGSEND = YES; 273 | GCC_C_LANGUAGE_STANDARD = gnu11; 274 | GCC_NO_COMMON_BLOCKS = YES; 275 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 276 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 277 | GCC_WARN_UNDECLARED_SELECTOR = YES; 278 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 279 | GCC_WARN_UNUSED_FUNCTION = YES; 280 | GCC_WARN_UNUSED_VARIABLE = YES; 281 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 282 | MTL_ENABLE_DEBUG_INFO = NO; 283 | MTL_FAST_MATH = YES; 284 | SDKROOT = iphoneos; 285 | SWIFT_COMPILATION_MODE = wholemodule; 286 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 287 | VALIDATE_PRODUCT = YES; 288 | }; 289 | name = Release; 290 | }; 291 | 214B505822FB331C000FEB3E /* Debug */ = { 292 | isa = XCBuildConfiguration; 293 | buildSettings = { 294 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 295 | CODE_SIGN_STYLE = Automatic; 296 | DEVELOPMENT_ASSET_PATHS = "DrawerView-SwiftUI/Preview\\ Content"; 297 | ENABLE_PREVIEWS = YES; 298 | INFOPLIST_FILE = "$(SRCROOT)/DrawerView-SwiftUI/Info.plist"; 299 | LD_RUNPATH_SEARCH_PATHS = ( 300 | "$(inherited)", 301 | "@executable_path/Frameworks", 302 | ); 303 | MARKETING_VERSION = 0.1; 304 | PRODUCT_BUNDLE_IDENTIFIER = TotoroQ.DrawerView; 305 | PRODUCT_NAME = "DrawerView-Demo-SwiftUI"; 306 | SWIFT_VERSION = 5.0; 307 | TARGETED_DEVICE_FAMILY = "1,2"; 308 | }; 309 | name = Debug; 310 | }; 311 | 214B505922FB331C000FEB3E /* Release */ = { 312 | isa = XCBuildConfiguration; 313 | buildSettings = { 314 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 315 | CODE_SIGN_STYLE = Automatic; 316 | DEVELOPMENT_ASSET_PATHS = "DrawerView-SwiftUI/Preview\\ Content"; 317 | ENABLE_PREVIEWS = YES; 318 | INFOPLIST_FILE = "$(SRCROOT)/DrawerView-SwiftUI/Info.plist"; 319 | LD_RUNPATH_SEARCH_PATHS = ( 320 | "$(inherited)", 321 | "@executable_path/Frameworks", 322 | ); 323 | MARKETING_VERSION = 0.1; 324 | PRODUCT_BUNDLE_IDENTIFIER = TotoroQ.DrawerView; 325 | PRODUCT_NAME = "DrawerView-Demo-SwiftUI"; 326 | SWIFT_VERSION = 5.0; 327 | TARGETED_DEVICE_FAMILY = "1,2"; 328 | }; 329 | name = Release; 330 | }; 331 | /* End XCBuildConfiguration section */ 332 | 333 | /* Begin XCConfigurationList section */ 334 | 214B503E22FB3319000FEB3E /* Build configuration list for PBXProject "DrawerView-Demo" */ = { 335 | isa = XCConfigurationList; 336 | buildConfigurations = ( 337 | 214B505522FB331C000FEB3E /* Debug */, 338 | 214B505622FB331C000FEB3E /* Release */, 339 | ); 340 | defaultConfigurationIsVisible = 0; 341 | defaultConfigurationName = Release; 342 | }; 343 | 214B505722FB331C000FEB3E /* Build configuration list for PBXNativeTarget "DrawerView-Demo" */ = { 344 | isa = XCConfigurationList; 345 | buildConfigurations = ( 346 | 214B505822FB331C000FEB3E /* Debug */, 347 | 214B505922FB331C000FEB3E /* Release */, 348 | ); 349 | defaultConfigurationIsVisible = 0; 350 | defaultConfigurationName = Release; 351 | }; 352 | /* End XCConfigurationList section */ 353 | }; 354 | rootObject = 214B503B22FB3319000FEB3E /* Project object */; 355 | } 356 | --------------------------------------------------------------------------------