├── .github
└── FUNDING.yml
├── .gitignore
├── .swift-version
├── Example
├── AppDelegate.swift
├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── Info.plist
└── ViewController.swift
├── LICENSE
├── PullableSheet.podspec
├── PullableSheet.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
└── xcshareddata
│ └── xcschemes
│ └── PullableSheet.xcscheme
├── README.md
├── Sources
├── Info.plist
├── PullableSheet+SnapPoint.swift
├── PullableSheet+TopBar.swift
├── PullableSheet.h
├── PullableSheet.swift
└── UIViewController+.swift
├── Tests
├── Info.plist
└── PullableSheetTests.swift
└── docs
└── assets
├── demo1.gif
├── demo2.gif
└── logo
├── horizontal.png
├── logo-only.svg
├── logomark.png
├── master.svg
└── vertical.png
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: tattn
4 | patreon: # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
13 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ### https://raw.github.com/github/gitignore/e6dd3a81e6037cc923e503e372c80326f65ccb25/Global/macos.gitignore
2 |
3 | *.DS_Store
4 | .AppleDouble
5 | .LSOverride
6 |
7 | # Icon must end with two \r
8 | Icon
9 |
10 |
11 | # Thumbnails
12 | ._*
13 |
14 | # Files that might appear in the root of a volume
15 | .DocumentRevisions-V100
16 | .fseventsd
17 | .Spotlight-V100
18 | .TemporaryItems
19 | .Trashes
20 | .VolumeIcon.icns
21 | .com.apple.timemachine.donotpresent
22 |
23 | # Directories potentially created on remote AFP share
24 | .AppleDB
25 | .AppleDesktop
26 | Network Trash Folder
27 | Temporary Items
28 | .apdisk
29 |
30 |
31 | ### https://raw.github.com/github/gitignore/e6dd3a81e6037cc923e503e372c80326f65ccb25/Global/xcode.gitignore
32 |
33 | # Xcode
34 | #
35 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
36 |
37 | ## Build generated
38 | build/
39 | DerivedData/
40 |
41 | ## Various settings
42 | *.pbxuser
43 | !default.pbxuser
44 | *.mode1v3
45 | !default.mode1v3
46 | *.mode2v3
47 | !default.mode2v3
48 | *.perspectivev3
49 | !default.perspectivev3
50 | xcuserdata/
51 |
52 | ## Other
53 | *.moved-aside
54 | *.xccheckout
55 | *.xcscmblueprint
56 | UserInterfaceState.xcuserstate
57 |
58 | #Carthage/Build
59 | Carthage
60 |
61 | Poddev
62 |
--------------------------------------------------------------------------------
/.swift-version:
--------------------------------------------------------------------------------
1 | 5.0
2 |
--------------------------------------------------------------------------------
/Example/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // Example
4 | //
5 | // Created by Tatsuya Tanaka on 20180723.
6 | // Copyright © 2018年 tattn. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(_ application: UIApplication) {
23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(_ application: UIApplication) {
28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(_ application: UIApplication) {
33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | func applicationDidBecomeActive(_ application: UIApplication) {
37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
38 | }
39 |
40 | func applicationWillTerminate(_ application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/Example/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 | }
--------------------------------------------------------------------------------
/Example/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/Base.lproj/Main.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 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/Example/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 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Example/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Example
4 | //
5 | // Created by Tatsuya Tanaka on 20180723.
6 | // Copyright © 2018年 tattn. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import PullableSheet
11 |
12 | class ViewController: UIViewController {
13 |
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 |
17 | let content = TableVC() // UIViewController()
18 | content.view.backgroundColor = .clear
19 |
20 | // let label = UILabel()
21 | // label.text = "Hello"
22 | // label.font = UIFont.systemFont(ofSize: 30, weight: .heavy)
23 | // content.view.addSubview(label)
24 | // label.sizeToFit()
25 | // label.center.x = content.view.center.x
26 | // label.frame.origin.y = 30
27 | // label.autoresizingMask = [.flexibleLeftMargin, .flexibleRightMargin, .flexibleBottomMargin]
28 |
29 | let view = UIView(frame: .init(x: 0, y: 5, width: 300, height: 30))
30 | view.backgroundColor = .green
31 | let sheet = PullableSheet(content: content, topBarStyle: .custom(view))
32 | sheet.snapPoints = [.min, .custom(y: 300), .max]
33 | // sheet.snapPoints = [.custom(y: 300), .custom(y: 700)]
34 | sheet.add(to: self)
35 | }
36 | }
37 |
38 | class TableVC: UITableViewController {
39 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
40 | return 20
41 | }
42 |
43 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
44 | let cell = UITableViewCell(style: .default, reuseIdentifier: nil)
45 | cell.textLabel?.text = "\(indexPath.row)"
46 | return cell
47 | }
48 |
49 | override func scrollViewDidScroll(_ scrollView: UIScrollView) {
50 | (parent as? PullableSheet)?.scrollViewDidScroll(scrollView)
51 | }
52 | }
53 |
54 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Tatsuya Tanaka
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 |
--------------------------------------------------------------------------------
/PullableSheet.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = 'PullableSheet'
3 | s.version = '0.1.0'
4 | s.summary = 'Pullable sheet like a default map app or bottom sheets (Android).'
5 |
6 | s.description = <<-DESC
7 | Pullable sheet like a default map app or bottom sheets (Android).
8 | https://github.com/tattn/PullableSheet
9 | DESC
10 |
11 | s.homepage = 'https://github.com/tattn/PullableSheet'
12 | s.license = { :type => 'MIT', :file => 'LICENSE' }
13 | s.author = { 'git' => 'tanakasan2525@gmail.com' }
14 | s.source = { :git => 'https://github.com/tattn/PullableSheet.git', :tag => s.version.to_s }
15 | s.social_media_url = 'https://twitter.com/tanakasan2525'
16 |
17 | s.ios.deployment_target = '10.0'
18 |
19 | s.source_files = 'Sources/**/*.{swift,h}'
20 |
21 | s.public_header_files = 'Sources/**/*.h'
22 | s.frameworks = 'UIKit'
23 | end
24 |
--------------------------------------------------------------------------------
/PullableSheet.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 245CAE10210617A0001C97B1 /* PullableSheet.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 245CAE06210617A0001C97B1 /* PullableSheet.framework */; };
11 | 245CAE15210617A0001C97B1 /* PullableSheetTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 245CAE14210617A0001C97B1 /* PullableSheetTests.swift */; };
12 | 245CAE17210617A0001C97B1 /* PullableSheet.h in Headers */ = {isa = PBXBuildFile; fileRef = 245CAE09210617A0001C97B1 /* PullableSheet.h */; settings = {ATTRIBUTES = (Public, ); }; };
13 | 245CAE2721061807001C97B1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 245CAE2621061807001C97B1 /* AppDelegate.swift */; };
14 | 245CAE2921061807001C97B1 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 245CAE2821061807001C97B1 /* ViewController.swift */; };
15 | 245CAE2C21061807001C97B1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 245CAE2A21061807001C97B1 /* Main.storyboard */; };
16 | 245CAE2E21061809001C97B1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 245CAE2D21061809001C97B1 /* Assets.xcassets */; };
17 | 245CAE3121061809001C97B1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 245CAE2F21061809001C97B1 /* LaunchScreen.storyboard */; };
18 | 245CAE3721061818001C97B1 /* PullableSheet.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 245CAE06210617A0001C97B1 /* PullableSheet.framework */; };
19 | 245CAE39210618A8001C97B1 /* PullableSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 245CAE38210618A8001C97B1 /* PullableSheet.swift */; };
20 | 245CAE3D21063B89001C97B1 /* PullableSheet+SnapPoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 245CAE3C21063B89001C97B1 /* PullableSheet+SnapPoint.swift */; };
21 | 245CAE3F21064585001C97B1 /* UIViewController+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 245CAE3E21064585001C97B1 /* UIViewController+.swift */; };
22 | 24E6516B214CD6A900502E14 /* PullableSheet+TopBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24E6516A214CD6A900502E14 /* PullableSheet+TopBar.swift */; };
23 | /* End PBXBuildFile section */
24 |
25 | /* Begin PBXContainerItemProxy section */
26 | 245CAE11210617A0001C97B1 /* PBXContainerItemProxy */ = {
27 | isa = PBXContainerItemProxy;
28 | containerPortal = 245CADFD210617A0001C97B1 /* Project object */;
29 | proxyType = 1;
30 | remoteGlobalIDString = 245CAE05210617A0001C97B1;
31 | remoteInfo = PullableSheet;
32 | };
33 | /* End PBXContainerItemProxy section */
34 |
35 | /* Begin PBXFileReference section */
36 | 245CAE06210617A0001C97B1 /* PullableSheet.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PullableSheet.framework; sourceTree = BUILT_PRODUCTS_DIR; };
37 | 245CAE09210617A0001C97B1 /* PullableSheet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PullableSheet.h; sourceTree = ""; };
38 | 245CAE0A210617A0001C97B1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
39 | 245CAE0F210617A0001C97B1 /* PullableSheetTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PullableSheetTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
40 | 245CAE14210617A0001C97B1 /* PullableSheetTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PullableSheetTests.swift; sourceTree = ""; };
41 | 245CAE16210617A0001C97B1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
42 | 245CAE2421061807001C97B1 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
43 | 245CAE2621061807001C97B1 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
44 | 245CAE2821061807001C97B1 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
45 | 245CAE2B21061807001C97B1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
46 | 245CAE2D21061809001C97B1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
47 | 245CAE3021061809001C97B1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
48 | 245CAE3221061809001C97B1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
49 | 245CAE38210618A8001C97B1 /* PullableSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PullableSheet.swift; sourceTree = ""; };
50 | 245CAE3C21063B89001C97B1 /* PullableSheet+SnapPoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PullableSheet+SnapPoint.swift"; sourceTree = ""; };
51 | 245CAE3E21064585001C97B1 /* UIViewController+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+.swift"; sourceTree = ""; };
52 | 24E6516A214CD6A900502E14 /* PullableSheet+TopBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PullableSheet+TopBar.swift"; sourceTree = ""; };
53 | /* End PBXFileReference section */
54 |
55 | /* Begin PBXFrameworksBuildPhase section */
56 | 245CAE02210617A0001C97B1 /* Frameworks */ = {
57 | isa = PBXFrameworksBuildPhase;
58 | buildActionMask = 2147483647;
59 | files = (
60 | );
61 | runOnlyForDeploymentPostprocessing = 0;
62 | };
63 | 245CAE0C210617A0001C97B1 /* Frameworks */ = {
64 | isa = PBXFrameworksBuildPhase;
65 | buildActionMask = 2147483647;
66 | files = (
67 | 245CAE10210617A0001C97B1 /* PullableSheet.framework in Frameworks */,
68 | );
69 | runOnlyForDeploymentPostprocessing = 0;
70 | };
71 | 245CAE2121061807001C97B1 /* Frameworks */ = {
72 | isa = PBXFrameworksBuildPhase;
73 | buildActionMask = 2147483647;
74 | files = (
75 | 245CAE3721061818001C97B1 /* PullableSheet.framework in Frameworks */,
76 | );
77 | runOnlyForDeploymentPostprocessing = 0;
78 | };
79 | /* End PBXFrameworksBuildPhase section */
80 |
81 | /* Begin PBXGroup section */
82 | 245CADFC210617A0001C97B1 = {
83 | isa = PBXGroup;
84 | children = (
85 | 245CAE08210617A0001C97B1 /* Sources */,
86 | 245CAE13210617A0001C97B1 /* Tests */,
87 | 245CAE2521061807001C97B1 /* Example */,
88 | 245CAE07210617A0001C97B1 /* Products */,
89 | 245CAE3621061818001C97B1 /* Frameworks */,
90 | );
91 | sourceTree = "";
92 | };
93 | 245CAE07210617A0001C97B1 /* Products */ = {
94 | isa = PBXGroup;
95 | children = (
96 | 245CAE06210617A0001C97B1 /* PullableSheet.framework */,
97 | 245CAE0F210617A0001C97B1 /* PullableSheetTests.xctest */,
98 | 245CAE2421061807001C97B1 /* Example.app */,
99 | );
100 | name = Products;
101 | sourceTree = "";
102 | };
103 | 245CAE08210617A0001C97B1 /* Sources */ = {
104 | isa = PBXGroup;
105 | children = (
106 | 245CAE09210617A0001C97B1 /* PullableSheet.h */,
107 | 245CAE0A210617A0001C97B1 /* Info.plist */,
108 | 245CAE38210618A8001C97B1 /* PullableSheet.swift */,
109 | 245CAE3C21063B89001C97B1 /* PullableSheet+SnapPoint.swift */,
110 | 24E6516A214CD6A900502E14 /* PullableSheet+TopBar.swift */,
111 | 245CAE3E21064585001C97B1 /* UIViewController+.swift */,
112 | );
113 | path = Sources;
114 | sourceTree = "";
115 | };
116 | 245CAE13210617A0001C97B1 /* Tests */ = {
117 | isa = PBXGroup;
118 | children = (
119 | 245CAE14210617A0001C97B1 /* PullableSheetTests.swift */,
120 | 245CAE16210617A0001C97B1 /* Info.plist */,
121 | );
122 | path = Tests;
123 | sourceTree = "";
124 | };
125 | 245CAE2521061807001C97B1 /* Example */ = {
126 | isa = PBXGroup;
127 | children = (
128 | 245CAE2621061807001C97B1 /* AppDelegate.swift */,
129 | 245CAE2821061807001C97B1 /* ViewController.swift */,
130 | 245CAE2A21061807001C97B1 /* Main.storyboard */,
131 | 245CAE2D21061809001C97B1 /* Assets.xcassets */,
132 | 245CAE2F21061809001C97B1 /* LaunchScreen.storyboard */,
133 | 245CAE3221061809001C97B1 /* Info.plist */,
134 | );
135 | path = Example;
136 | sourceTree = "";
137 | };
138 | 245CAE3621061818001C97B1 /* Frameworks */ = {
139 | isa = PBXGroup;
140 | children = (
141 | );
142 | name = Frameworks;
143 | sourceTree = "";
144 | };
145 | /* End PBXGroup section */
146 |
147 | /* Begin PBXHeadersBuildPhase section */
148 | 245CAE03210617A0001C97B1 /* Headers */ = {
149 | isa = PBXHeadersBuildPhase;
150 | buildActionMask = 2147483647;
151 | files = (
152 | 245CAE17210617A0001C97B1 /* PullableSheet.h in Headers */,
153 | );
154 | runOnlyForDeploymentPostprocessing = 0;
155 | };
156 | /* End PBXHeadersBuildPhase section */
157 |
158 | /* Begin PBXNativeTarget section */
159 | 245CAE05210617A0001C97B1 /* PullableSheet */ = {
160 | isa = PBXNativeTarget;
161 | buildConfigurationList = 245CAE1A210617A0001C97B1 /* Build configuration list for PBXNativeTarget "PullableSheet" */;
162 | buildPhases = (
163 | 245CAE01210617A0001C97B1 /* Sources */,
164 | 245CAE02210617A0001C97B1 /* Frameworks */,
165 | 245CAE03210617A0001C97B1 /* Headers */,
166 | 245CAE04210617A0001C97B1 /* Resources */,
167 | );
168 | buildRules = (
169 | );
170 | dependencies = (
171 | );
172 | name = PullableSheet;
173 | productName = PullableSheet;
174 | productReference = 245CAE06210617A0001C97B1 /* PullableSheet.framework */;
175 | productType = "com.apple.product-type.framework";
176 | };
177 | 245CAE0E210617A0001C97B1 /* PullableSheetTests */ = {
178 | isa = PBXNativeTarget;
179 | buildConfigurationList = 245CAE1D210617A0001C97B1 /* Build configuration list for PBXNativeTarget "PullableSheetTests" */;
180 | buildPhases = (
181 | 245CAE0B210617A0001C97B1 /* Sources */,
182 | 245CAE0C210617A0001C97B1 /* Frameworks */,
183 | 245CAE0D210617A0001C97B1 /* Resources */,
184 | );
185 | buildRules = (
186 | );
187 | dependencies = (
188 | 245CAE12210617A0001C97B1 /* PBXTargetDependency */,
189 | );
190 | name = PullableSheetTests;
191 | productName = PullableSheetTests;
192 | productReference = 245CAE0F210617A0001C97B1 /* PullableSheetTests.xctest */;
193 | productType = "com.apple.product-type.bundle.unit-test";
194 | };
195 | 245CAE2321061807001C97B1 /* Example */ = {
196 | isa = PBXNativeTarget;
197 | buildConfigurationList = 245CAE3321061809001C97B1 /* Build configuration list for PBXNativeTarget "Example" */;
198 | buildPhases = (
199 | 245CAE2021061807001C97B1 /* Sources */,
200 | 245CAE2121061807001C97B1 /* Frameworks */,
201 | 245CAE2221061807001C97B1 /* Resources */,
202 | );
203 | buildRules = (
204 | );
205 | dependencies = (
206 | );
207 | name = Example;
208 | productName = Example;
209 | productReference = 245CAE2421061807001C97B1 /* Example.app */;
210 | productType = "com.apple.product-type.application";
211 | };
212 | /* End PBXNativeTarget section */
213 |
214 | /* Begin PBXProject section */
215 | 245CADFD210617A0001C97B1 /* Project object */ = {
216 | isa = PBXProject;
217 | attributes = {
218 | LastSwiftUpdateCheck = 0940;
219 | LastUpgradeCheck = 0940;
220 | ORGANIZATIONNAME = tattn;
221 | TargetAttributes = {
222 | 245CAE05210617A0001C97B1 = {
223 | CreatedOnToolsVersion = 9.4.1;
224 | LastSwiftMigration = 1020;
225 | };
226 | 245CAE0E210617A0001C97B1 = {
227 | CreatedOnToolsVersion = 9.4.1;
228 | LastSwiftMigration = 1020;
229 | };
230 | 245CAE2321061807001C97B1 = {
231 | CreatedOnToolsVersion = 9.4.1;
232 | LastSwiftMigration = 1020;
233 | };
234 | };
235 | };
236 | buildConfigurationList = 245CAE00210617A0001C97B1 /* Build configuration list for PBXProject "PullableSheet" */;
237 | compatibilityVersion = "Xcode 9.3";
238 | developmentRegion = en;
239 | hasScannedForEncodings = 0;
240 | knownRegions = (
241 | en,
242 | Base,
243 | );
244 | mainGroup = 245CADFC210617A0001C97B1;
245 | productRefGroup = 245CAE07210617A0001C97B1 /* Products */;
246 | projectDirPath = "";
247 | projectRoot = "";
248 | targets = (
249 | 245CAE05210617A0001C97B1 /* PullableSheet */,
250 | 245CAE0E210617A0001C97B1 /* PullableSheetTests */,
251 | 245CAE2321061807001C97B1 /* Example */,
252 | );
253 | };
254 | /* End PBXProject section */
255 |
256 | /* Begin PBXResourcesBuildPhase section */
257 | 245CAE04210617A0001C97B1 /* Resources */ = {
258 | isa = PBXResourcesBuildPhase;
259 | buildActionMask = 2147483647;
260 | files = (
261 | );
262 | runOnlyForDeploymentPostprocessing = 0;
263 | };
264 | 245CAE0D210617A0001C97B1 /* Resources */ = {
265 | isa = PBXResourcesBuildPhase;
266 | buildActionMask = 2147483647;
267 | files = (
268 | );
269 | runOnlyForDeploymentPostprocessing = 0;
270 | };
271 | 245CAE2221061807001C97B1 /* Resources */ = {
272 | isa = PBXResourcesBuildPhase;
273 | buildActionMask = 2147483647;
274 | files = (
275 | 245CAE3121061809001C97B1 /* LaunchScreen.storyboard in Resources */,
276 | 245CAE2E21061809001C97B1 /* Assets.xcassets in Resources */,
277 | 245CAE2C21061807001C97B1 /* Main.storyboard in Resources */,
278 | );
279 | runOnlyForDeploymentPostprocessing = 0;
280 | };
281 | /* End PBXResourcesBuildPhase section */
282 |
283 | /* Begin PBXSourcesBuildPhase section */
284 | 245CAE01210617A0001C97B1 /* Sources */ = {
285 | isa = PBXSourcesBuildPhase;
286 | buildActionMask = 2147483647;
287 | files = (
288 | 245CAE39210618A8001C97B1 /* PullableSheet.swift in Sources */,
289 | 245CAE3D21063B89001C97B1 /* PullableSheet+SnapPoint.swift in Sources */,
290 | 24E6516B214CD6A900502E14 /* PullableSheet+TopBar.swift in Sources */,
291 | 245CAE3F21064585001C97B1 /* UIViewController+.swift in Sources */,
292 | );
293 | runOnlyForDeploymentPostprocessing = 0;
294 | };
295 | 245CAE0B210617A0001C97B1 /* Sources */ = {
296 | isa = PBXSourcesBuildPhase;
297 | buildActionMask = 2147483647;
298 | files = (
299 | 245CAE15210617A0001C97B1 /* PullableSheetTests.swift in Sources */,
300 | );
301 | runOnlyForDeploymentPostprocessing = 0;
302 | };
303 | 245CAE2021061807001C97B1 /* Sources */ = {
304 | isa = PBXSourcesBuildPhase;
305 | buildActionMask = 2147483647;
306 | files = (
307 | 245CAE2921061807001C97B1 /* ViewController.swift in Sources */,
308 | 245CAE2721061807001C97B1 /* AppDelegate.swift in Sources */,
309 | );
310 | runOnlyForDeploymentPostprocessing = 0;
311 | };
312 | /* End PBXSourcesBuildPhase section */
313 |
314 | /* Begin PBXTargetDependency section */
315 | 245CAE12210617A0001C97B1 /* PBXTargetDependency */ = {
316 | isa = PBXTargetDependency;
317 | target = 245CAE05210617A0001C97B1 /* PullableSheet */;
318 | targetProxy = 245CAE11210617A0001C97B1 /* PBXContainerItemProxy */;
319 | };
320 | /* End PBXTargetDependency section */
321 |
322 | /* Begin PBXVariantGroup section */
323 | 245CAE2A21061807001C97B1 /* Main.storyboard */ = {
324 | isa = PBXVariantGroup;
325 | children = (
326 | 245CAE2B21061807001C97B1 /* Base */,
327 | );
328 | name = Main.storyboard;
329 | sourceTree = "";
330 | };
331 | 245CAE2F21061809001C97B1 /* LaunchScreen.storyboard */ = {
332 | isa = PBXVariantGroup;
333 | children = (
334 | 245CAE3021061809001C97B1 /* Base */,
335 | );
336 | name = LaunchScreen.storyboard;
337 | sourceTree = "";
338 | };
339 | /* End PBXVariantGroup section */
340 |
341 | /* Begin XCBuildConfiguration section */
342 | 245CAE18210617A0001C97B1 /* Debug */ = {
343 | isa = XCBuildConfiguration;
344 | buildSettings = {
345 | ALWAYS_SEARCH_USER_PATHS = NO;
346 | CLANG_ANALYZER_NONNULL = YES;
347 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
348 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
349 | CLANG_CXX_LIBRARY = "libc++";
350 | CLANG_ENABLE_MODULES = YES;
351 | CLANG_ENABLE_OBJC_ARC = YES;
352 | CLANG_ENABLE_OBJC_WEAK = YES;
353 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
354 | CLANG_WARN_BOOL_CONVERSION = YES;
355 | CLANG_WARN_COMMA = YES;
356 | CLANG_WARN_CONSTANT_CONVERSION = YES;
357 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
358 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
359 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
360 | CLANG_WARN_EMPTY_BODY = YES;
361 | CLANG_WARN_ENUM_CONVERSION = YES;
362 | CLANG_WARN_INFINITE_RECURSION = YES;
363 | CLANG_WARN_INT_CONVERSION = YES;
364 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
365 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
366 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
367 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
368 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
369 | CLANG_WARN_STRICT_PROTOTYPES = YES;
370 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
371 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
372 | CLANG_WARN_UNREACHABLE_CODE = YES;
373 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
374 | CODE_SIGN_IDENTITY = "iPhone Developer";
375 | COPY_PHASE_STRIP = NO;
376 | CURRENT_PROJECT_VERSION = 1;
377 | DEBUG_INFORMATION_FORMAT = dwarf;
378 | ENABLE_STRICT_OBJC_MSGSEND = YES;
379 | ENABLE_TESTABILITY = YES;
380 | GCC_C_LANGUAGE_STANDARD = gnu11;
381 | GCC_DYNAMIC_NO_PIC = NO;
382 | GCC_NO_COMMON_BLOCKS = YES;
383 | GCC_OPTIMIZATION_LEVEL = 0;
384 | GCC_PREPROCESSOR_DEFINITIONS = (
385 | "DEBUG=1",
386 | "$(inherited)",
387 | );
388 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
389 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
390 | GCC_WARN_UNDECLARED_SELECTOR = YES;
391 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
392 | GCC_WARN_UNUSED_FUNCTION = YES;
393 | GCC_WARN_UNUSED_VARIABLE = YES;
394 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
395 | MTL_ENABLE_DEBUG_INFO = YES;
396 | ONLY_ACTIVE_ARCH = YES;
397 | SDKROOT = iphoneos;
398 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
399 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
400 | VERSIONING_SYSTEM = "apple-generic";
401 | VERSION_INFO_PREFIX = "";
402 | };
403 | name = Debug;
404 | };
405 | 245CAE19210617A0001C97B1 /* Release */ = {
406 | isa = XCBuildConfiguration;
407 | buildSettings = {
408 | ALWAYS_SEARCH_USER_PATHS = NO;
409 | CLANG_ANALYZER_NONNULL = YES;
410 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
411 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
412 | CLANG_CXX_LIBRARY = "libc++";
413 | CLANG_ENABLE_MODULES = YES;
414 | CLANG_ENABLE_OBJC_ARC = YES;
415 | CLANG_ENABLE_OBJC_WEAK = YES;
416 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
417 | CLANG_WARN_BOOL_CONVERSION = YES;
418 | CLANG_WARN_COMMA = YES;
419 | CLANG_WARN_CONSTANT_CONVERSION = YES;
420 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
421 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
422 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
423 | CLANG_WARN_EMPTY_BODY = YES;
424 | CLANG_WARN_ENUM_CONVERSION = YES;
425 | CLANG_WARN_INFINITE_RECURSION = YES;
426 | CLANG_WARN_INT_CONVERSION = YES;
427 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
428 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
429 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
430 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
431 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
432 | CLANG_WARN_STRICT_PROTOTYPES = YES;
433 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
434 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
435 | CLANG_WARN_UNREACHABLE_CODE = YES;
436 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
437 | CODE_SIGN_IDENTITY = "iPhone Developer";
438 | COPY_PHASE_STRIP = NO;
439 | CURRENT_PROJECT_VERSION = 1;
440 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
441 | ENABLE_NS_ASSERTIONS = NO;
442 | ENABLE_STRICT_OBJC_MSGSEND = YES;
443 | GCC_C_LANGUAGE_STANDARD = gnu11;
444 | GCC_NO_COMMON_BLOCKS = YES;
445 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
446 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
447 | GCC_WARN_UNDECLARED_SELECTOR = YES;
448 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
449 | GCC_WARN_UNUSED_FUNCTION = YES;
450 | GCC_WARN_UNUSED_VARIABLE = YES;
451 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
452 | MTL_ENABLE_DEBUG_INFO = NO;
453 | SDKROOT = iphoneos;
454 | SWIFT_COMPILATION_MODE = wholemodule;
455 | SWIFT_OPTIMIZATION_LEVEL = "-O";
456 | VALIDATE_PRODUCT = YES;
457 | VERSIONING_SYSTEM = "apple-generic";
458 | VERSION_INFO_PREFIX = "";
459 | };
460 | name = Release;
461 | };
462 | 245CAE1B210617A0001C97B1 /* Debug */ = {
463 | isa = XCBuildConfiguration;
464 | buildSettings = {
465 | CLANG_ENABLE_MODULES = YES;
466 | CODE_SIGN_IDENTITY = "";
467 | CODE_SIGN_STYLE = Automatic;
468 | DEFINES_MODULE = YES;
469 | DYLIB_COMPATIBILITY_VERSION = 1;
470 | DYLIB_CURRENT_VERSION = 1;
471 | DYLIB_INSTALL_NAME_BASE = "@rpath";
472 | INFOPLIST_FILE = Sources/Info.plist;
473 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
474 | LD_RUNPATH_SEARCH_PATHS = (
475 | "$(inherited)",
476 | "@executable_path/Frameworks",
477 | "@loader_path/Frameworks",
478 | );
479 | PRODUCT_BUNDLE_IDENTIFIER = com.github.tattn.PullableSheet;
480 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
481 | SKIP_INSTALL = YES;
482 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
483 | SWIFT_VERSION = 5.0;
484 | TARGETED_DEVICE_FAMILY = "1,2";
485 | };
486 | name = Debug;
487 | };
488 | 245CAE1C210617A0001C97B1 /* Release */ = {
489 | isa = XCBuildConfiguration;
490 | buildSettings = {
491 | CLANG_ENABLE_MODULES = YES;
492 | CODE_SIGN_IDENTITY = "";
493 | CODE_SIGN_STYLE = Automatic;
494 | DEFINES_MODULE = YES;
495 | DYLIB_COMPATIBILITY_VERSION = 1;
496 | DYLIB_CURRENT_VERSION = 1;
497 | DYLIB_INSTALL_NAME_BASE = "@rpath";
498 | INFOPLIST_FILE = Sources/Info.plist;
499 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
500 | LD_RUNPATH_SEARCH_PATHS = (
501 | "$(inherited)",
502 | "@executable_path/Frameworks",
503 | "@loader_path/Frameworks",
504 | );
505 | PRODUCT_BUNDLE_IDENTIFIER = com.github.tattn.PullableSheet;
506 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
507 | SKIP_INSTALL = YES;
508 | SWIFT_VERSION = 5.0;
509 | TARGETED_DEVICE_FAMILY = "1,2";
510 | };
511 | name = Release;
512 | };
513 | 245CAE1E210617A0001C97B1 /* Debug */ = {
514 | isa = XCBuildConfiguration;
515 | buildSettings = {
516 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
517 | CODE_SIGN_STYLE = Automatic;
518 | INFOPLIST_FILE = Tests/Info.plist;
519 | LD_RUNPATH_SEARCH_PATHS = (
520 | "$(inherited)",
521 | "@executable_path/Frameworks",
522 | "@loader_path/Frameworks",
523 | );
524 | PRODUCT_BUNDLE_IDENTIFIER = com.github.tattn.PullableSheetTests;
525 | PRODUCT_NAME = "$(TARGET_NAME)";
526 | SWIFT_VERSION = 5.0;
527 | TARGETED_DEVICE_FAMILY = "1,2";
528 | };
529 | name = Debug;
530 | };
531 | 245CAE1F210617A0001C97B1 /* Release */ = {
532 | isa = XCBuildConfiguration;
533 | buildSettings = {
534 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
535 | CODE_SIGN_STYLE = Automatic;
536 | INFOPLIST_FILE = Tests/Info.plist;
537 | LD_RUNPATH_SEARCH_PATHS = (
538 | "$(inherited)",
539 | "@executable_path/Frameworks",
540 | "@loader_path/Frameworks",
541 | );
542 | PRODUCT_BUNDLE_IDENTIFIER = com.github.tattn.PullableSheetTests;
543 | PRODUCT_NAME = "$(TARGET_NAME)";
544 | SWIFT_VERSION = 5.0;
545 | TARGETED_DEVICE_FAMILY = "1,2";
546 | };
547 | name = Release;
548 | };
549 | 245CAE3421061809001C97B1 /* Debug */ = {
550 | isa = XCBuildConfiguration;
551 | buildSettings = {
552 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
553 | CODE_SIGN_STYLE = Automatic;
554 | INFOPLIST_FILE = Example/Info.plist;
555 | LD_RUNPATH_SEARCH_PATHS = (
556 | "$(inherited)",
557 | "@executable_path/Frameworks",
558 | );
559 | PRODUCT_BUNDLE_IDENTIFIER = com.github.tattn.Example;
560 | PRODUCT_NAME = "$(TARGET_NAME)";
561 | SWIFT_VERSION = 5.0;
562 | TARGETED_DEVICE_FAMILY = "1,2";
563 | };
564 | name = Debug;
565 | };
566 | 245CAE3521061809001C97B1 /* Release */ = {
567 | isa = XCBuildConfiguration;
568 | buildSettings = {
569 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
570 | CODE_SIGN_STYLE = Automatic;
571 | INFOPLIST_FILE = Example/Info.plist;
572 | LD_RUNPATH_SEARCH_PATHS = (
573 | "$(inherited)",
574 | "@executable_path/Frameworks",
575 | );
576 | PRODUCT_BUNDLE_IDENTIFIER = com.github.tattn.Example;
577 | PRODUCT_NAME = "$(TARGET_NAME)";
578 | SWIFT_VERSION = 5.0;
579 | TARGETED_DEVICE_FAMILY = "1,2";
580 | };
581 | name = Release;
582 | };
583 | /* End XCBuildConfiguration section */
584 |
585 | /* Begin XCConfigurationList section */
586 | 245CAE00210617A0001C97B1 /* Build configuration list for PBXProject "PullableSheet" */ = {
587 | isa = XCConfigurationList;
588 | buildConfigurations = (
589 | 245CAE18210617A0001C97B1 /* Debug */,
590 | 245CAE19210617A0001C97B1 /* Release */,
591 | );
592 | defaultConfigurationIsVisible = 0;
593 | defaultConfigurationName = Release;
594 | };
595 | 245CAE1A210617A0001C97B1 /* Build configuration list for PBXNativeTarget "PullableSheet" */ = {
596 | isa = XCConfigurationList;
597 | buildConfigurations = (
598 | 245CAE1B210617A0001C97B1 /* Debug */,
599 | 245CAE1C210617A0001C97B1 /* Release */,
600 | );
601 | defaultConfigurationIsVisible = 0;
602 | defaultConfigurationName = Release;
603 | };
604 | 245CAE1D210617A0001C97B1 /* Build configuration list for PBXNativeTarget "PullableSheetTests" */ = {
605 | isa = XCConfigurationList;
606 | buildConfigurations = (
607 | 245CAE1E210617A0001C97B1 /* Debug */,
608 | 245CAE1F210617A0001C97B1 /* Release */,
609 | );
610 | defaultConfigurationIsVisible = 0;
611 | defaultConfigurationName = Release;
612 | };
613 | 245CAE3321061809001C97B1 /* Build configuration list for PBXNativeTarget "Example" */ = {
614 | isa = XCConfigurationList;
615 | buildConfigurations = (
616 | 245CAE3421061809001C97B1 /* Debug */,
617 | 245CAE3521061809001C97B1 /* Release */,
618 | );
619 | defaultConfigurationIsVisible = 0;
620 | defaultConfigurationName = Release;
621 | };
622 | /* End XCConfigurationList section */
623 | };
624 | rootObject = 245CADFD210617A0001C97B1 /* Project object */;
625 | }
626 |
--------------------------------------------------------------------------------
/PullableSheet.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/PullableSheet.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/PullableSheet.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/PullableSheet.xcodeproj/xcshareddata/xcschemes/PullableSheet.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
49 |
50 |
51 |
52 |
53 |
54 |
64 |
65 |
71 |
72 |
73 |
74 |
75 |
76 |
82 |
83 |
89 |
90 |
91 |
92 |
94 |
95 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | PullableSheet is like a sheet in a default map app or Android's bottom sheets.
7 |
8 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | # Installation
35 |
36 | ## Carthage
37 |
38 | ```ruby
39 | github "tattn/PullableSheet"
40 | ```
41 |
42 | ## CocoaPods
43 |
44 | ```ruby
45 | pod 'PullableSheet'
46 | ```
47 |
48 | # Usage
49 |
50 | ```swift
51 | import PullableSheet
52 |
53 | // ....
54 |
55 | override func viewDidLoad() {
56 | super.viewDidLoad()
57 |
58 | let content = UIViewController() // your view controller
59 | content.view.backgroundColor = .clear
60 |
61 | let sheet = PullableSheet(content: content)
62 | sheet.snapPoints = [.min, .custom(y: 300), .max] // snap points (if needed)
63 | sheet.add(to: self)
64 | }
65 | ```
66 |
67 | ## Customize top bar
68 |
69 | ```swift
70 | let topBar = UIView(frame: .init(x: 0, y: 5, width: 300, height: 30))
71 | topBar.backgroundColor = .green
72 | let sheet = PullableSheet(content: content, topBarStyle: .custom(topBar))
73 | ```
74 |
75 |
76 | # Contributing
77 |
78 | 1. Fork it!
79 | 2. Create your feature branch: `git checkout -b my-new-feature`
80 | 3. Commit your changes: `git commit -am 'Add some feature'`
81 | 4. Push to the branch: `git push origin my-new-feature`
82 | 5. Submit a pull request :D
83 |
84 | # License
85 |
86 | PullableSheet is released under the MIT license. See LICENSE for details.
87 |
--------------------------------------------------------------------------------
/Sources/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 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 | NSPrincipalClass
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Sources/PullableSheet+SnapPoint.swift:
--------------------------------------------------------------------------------
1 | //
2 | // PullableSheet+SnapPoint.swift
3 | // PullableSheet
4 | //
5 | // Created by Tatsuya Tanaka on 20180724.
6 | // Copyright © 2018年 tattn. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | extension PullableSheet {
12 | public enum SnapPoint {
13 | case min
14 | case max
15 | case custom(y: CGFloat)
16 |
17 | var y: CGFloat {
18 | switch self {
19 | case .min:
20 | if #available(iOS 11.0, *) {
21 | return UIApplication.shared.keyWindow!.safeAreaInsets.top // FIXME
22 | } else {
23 | return 0
24 | }
25 | case .max:
26 | return UIScreen.main.bounds.height - {
27 | if #available(iOS 11.0, *) {
28 | return UIApplication.shared.keyWindow!.safeAreaInsets.bottom // FIXME
29 | } else {
30 | return 0
31 | }
32 | }()
33 | case .custom(let y):
34 | return y
35 | }
36 | }
37 | }
38 |
39 | func nearestPoint(of pointY: CGFloat) -> CGFloat {
40 | var result: (y: CGFloat, distance: CGFloat) = (0, .greatestFiniteMagnitude)
41 | for snapPoint in snapPoints {
42 | let y = snapPoint.y
43 | let distance = abs(y - pointY)
44 | if result.distance > distance {
45 | result = (y: y, distance: distance)
46 | }
47 | }
48 | return result.y
49 | }
50 | }
51 |
52 | extension PullableSheet.SnapPoint: Comparable {
53 | public static func == (lhs: PullableSheet.SnapPoint, rhs: PullableSheet.SnapPoint) -> Bool {
54 | switch (lhs, rhs) {
55 | case (.min, .min): return true
56 | case (.max, .max): return true
57 | case (.custom(let y1), .custom(let y2)): return y1 == y2
58 | default: return false
59 | }
60 | }
61 |
62 | public static func < (lhs: PullableSheet.SnapPoint, rhs: PullableSheet.SnapPoint) -> Bool {
63 | switch (lhs, rhs) {
64 | case (.min, _): return true
65 | case (.max, _): return false
66 | case (_, .min): return false
67 | case (_, .max): return true
68 | case (.custom(let y1), .custom(let y2)): return y1 < y2
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/Sources/PullableSheet+TopBar.swift:
--------------------------------------------------------------------------------
1 | //
2 | // PullableSheet+TopBar.swift
3 | // PullableSheet
4 | //
5 | // Created by Tatsuya Tanaka on 20180915.
6 | // Copyright © 2018年 tattn. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | extension PullableSheet {
12 | public enum TopBarStyle {
13 | case `default`
14 | case custom(UIView)
15 | }
16 | }
17 |
18 | extension PullableSheet.TopBarStyle {
19 | public var view: UIView {
20 | switch self {
21 | case .default:
22 | let view = UIView(frame: .init(x: 0, y: 5, width: 50, height: 5))
23 | view.backgroundColor = .black
24 | view.layer.cornerRadius = 3
25 | return view
26 | case .custom(let view):
27 | return view
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Sources/PullableSheet.h:
--------------------------------------------------------------------------------
1 | //
2 | // PullableSheet.h
3 | // PullableSheet
4 | //
5 | // Created by Tatsuya Tanaka on 20180723.
6 | // Copyright © 2018年 tattn. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for PullableSheet.
12 | FOUNDATION_EXPORT double PullableSheetVersionNumber;
13 |
14 | //! Project version string for PullableSheet.
15 | FOUNDATION_EXPORT const unsigned char PullableSheetVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Sources/PullableSheet.swift:
--------------------------------------------------------------------------------
1 | //
2 | // PullableSheet.swift
3 | // PullableSheet
4 | //
5 | // Created by Tatsuya Tanaka on 20180723.
6 | // Copyright © 2018年 tattn. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | open class PullableSheet: UIViewController {
12 |
13 | open var snapPoints: [SnapPoint] = [.min, .max] {
14 | didSet { snapPoints.sort() }
15 | }
16 |
17 | private var pullableMinY: CGFloat {
18 | return snapPoints.first?.y ?? SnapPoint.min.y
19 | }
20 |
21 | private var pullableMaxY: CGFloat {
22 | return snapPoints.last?.y ?? SnapPoint.max.y
23 | }
24 |
25 | private let topBarStyle: TopBarStyle
26 |
27 | private var parentView: UIView?
28 | private let contentViewController: UIViewController?
29 | private weak var contentScrollView: UIScrollView?
30 | private var contentScrollViewPreviousOffset: CGFloat = 0
31 |
32 | public init(content: UIViewController, topBarStyle: TopBarStyle = .default) {
33 | self.contentViewController = content
34 | self.topBarStyle = topBarStyle
35 | super.init(nibName: nil, bundle: nil)
36 | }
37 |
38 | required public init?(coder aDecoder: NSCoder) {
39 | contentViewController = nil
40 | topBarStyle = .default
41 | super.init(coder: aDecoder)
42 | }
43 |
44 | override open func viewDidLoad() {
45 | super.viewDidLoad()
46 | setupViews()
47 | }
48 |
49 | override open func viewDidAppear(_ animated: Bool) {
50 | super.viewDidAppear(animated)
51 | close()
52 | }
53 |
54 | private func setupViews() {
55 | view.backgroundColor = .clear
56 | view.layer.cornerRadius = 5
57 | view.clipsToBounds = true
58 |
59 | let gesture = UIPanGestureRecognizer(target: self, action: #selector(panGesture))
60 | gesture.delegate = self
61 | view.addGestureRecognizer(gesture)
62 |
63 | let topBar = topBarStyle.view
64 | view.addSubview(topBar)
65 | topBar.center.x = view.center.x
66 | topBar.autoresizingMask = [.flexibleLeftMargin, .flexibleRightMargin]
67 |
68 | if let content = contentViewController {
69 | addContainerView(content)
70 | content.view.translatesAutoresizingMaskIntoConstraints = false
71 | NSLayoutConstraint.activate([
72 | content.view.topAnchor.constraint(equalTo: topBar.bottomAnchor, constant: 5),
73 | content.view.leftAnchor.constraint(equalTo: view.leftAnchor),
74 | content.view.rightAnchor.constraint(equalTo: view.rightAnchor)
75 | ])
76 | if #available(iOS 11.0, *) {
77 | content.view.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor).isActive = true
78 | } else {
79 | content.view.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true
80 | }
81 | }
82 |
83 | setupBluredView()
84 | }
85 |
86 | open override func viewDidLayoutSubviews() {
87 | super.viewDidLayoutSubviews()
88 | guard let view = parentView else { return }
89 | self.view.frame.size.height = view.frame.height - pullableMinY
90 | }
91 |
92 | open override func willTransition(to newCollection: UITraitCollection, with coordinator: UIViewControllerTransitionCoordinator) {
93 | super.willTransition(to: newCollection, with: coordinator)
94 | close()
95 | }
96 |
97 | private func setupBluredView() {
98 | let blurEffect = UIBlurEffect(style: .light) // .dark
99 | let visualEffect = UIVisualEffectView(effect: blurEffect)
100 | let bluredView = UIVisualEffectView(effect: blurEffect)
101 | bluredView.contentView.addSubview(visualEffect)
102 |
103 | visualEffect.frame = UIScreen.main.bounds
104 | bluredView.frame = UIScreen.main.bounds
105 |
106 | view.insertSubview(bluredView, at: 0)
107 | }
108 |
109 | open func add(to viewController: UIViewController, view: UIView? = nil) {
110 | parentView = view ?? viewController.view
111 | viewController.addContainerView(self, view: view)
112 | self.view.autoresizingMask = [.flexibleWidth, .flexibleTopMargin]
113 | }
114 |
115 | open func scroll(toY y: CGFloat, duration: Double = 0.6) {
116 | UIView.animate(withDuration: duration, delay: 0.0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [.allowUserInteraction], animations: {
117 | self.view.frame.origin.y = y
118 | }, completion: nil)
119 | }
120 |
121 | open func close() {
122 | scroll(toY: pullableMaxY)
123 | }
124 |
125 | open func scrollViewDidScroll(_ scrollView: UIScrollView) {
126 | self.contentScrollView = scrollView
127 |
128 | if scrollView.contentOffset.y < 0 {
129 | scrollView.contentOffset.y = 0
130 | } else if view.frame.minY > pullableMinY {
131 | scrollView.contentOffset.y = contentScrollViewPreviousOffset
132 | }
133 | contentScrollViewPreviousOffset = scrollView.contentOffset.y
134 | }
135 |
136 | @objc private func panGesture(_ recognizer: UIPanGestureRecognizer) {
137 | defer { recognizer.setTranslation(.zero, in: view) }
138 | if let scrollView = contentScrollView {
139 | let velocity = scrollView.panGestureRecognizer.velocity(in: scrollView).y
140 | if velocity > 0 && scrollView.contentOffset.y > 0 {
141 | return
142 | }
143 | }
144 |
145 | let translation = recognizer.translation(in: view)
146 | let velocity = recognizer.velocity(in: view)
147 | let y = view.frame.minY
148 |
149 | view.frame.origin.y = min(max(y + translation.y, pullableMinY), pullableMaxY)
150 |
151 | if recognizer.state == .ended, !snapPoints.isEmpty {
152 | let targetY = nearestPoint(of: y)
153 | let distance = abs(y - targetY)
154 | let duration = max(min(distance / velocity.y, distance / (UIScreen.main.bounds.height / 3)), 0.3)
155 |
156 | scroll(toY: targetY, duration: Double(duration))
157 | }
158 | }
159 | }
160 |
161 | extension PullableSheet: UIGestureRecognizerDelegate {
162 | public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer,
163 | shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
164 | return true
165 | }
166 | }
167 |
--------------------------------------------------------------------------------
/Sources/UIViewController+.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+.swift
3 | // PullableSheet
4 | //
5 | // Created by Tatsuya Tanaka on 20180724.
6 | // Copyright © 2018年 tattn. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | extension UIViewController {
12 | func addContainerView(_ viewController: UIViewController, view: UIView? = nil) {
13 | guard let targetView = view ?? viewController.view else { return }
14 | addChild(viewController)
15 | self.view.addSubview(targetView)
16 | viewController.didMove(toParent: self)
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Tests/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 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Tests/PullableSheetTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // PullableSheetTests.swift
3 | // PullableSheetTests
4 | //
5 | // Created by Tatsuya Tanaka on 20180723.
6 | // Copyright © 2018年 tattn. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | @testable import PullableSheet
11 |
12 | class PullableSheetTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | // Use XCTAssert and related functions to verify your tests produce the correct results.
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measure {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/docs/assets/demo1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tattn/PullableSheet/871cbf796fe42960fa49f1f6e79bbe907c7971c4/docs/assets/demo1.gif
--------------------------------------------------------------------------------
/docs/assets/demo2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tattn/PullableSheet/871cbf796fe42960fa49f1f6e79bbe907c7971c4/docs/assets/demo2.gif
--------------------------------------------------------------------------------
/docs/assets/logo/horizontal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tattn/PullableSheet/871cbf796fe42960fa49f1f6e79bbe907c7971c4/docs/assets/logo/horizontal.png
--------------------------------------------------------------------------------
/docs/assets/logo/logo-only.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
209 |
--------------------------------------------------------------------------------
/docs/assets/logo/logomark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tattn/PullableSheet/871cbf796fe42960fa49f1f6e79bbe907c7971c4/docs/assets/logo/logomark.png
--------------------------------------------------------------------------------
/docs/assets/logo/master.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
650 |
--------------------------------------------------------------------------------
/docs/assets/logo/vertical.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tattn/PullableSheet/871cbf796fe42960fa49f1f6e79bbe907c7971c4/docs/assets/logo/vertical.png
--------------------------------------------------------------------------------