├── NBBottomSheet
├── .swiftlint.yml
├── NBBottomSheet.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── xcshareddata
│ │ └── xcschemes
│ │ │ └── NBBottomSheet.xcscheme
│ └── project.pbxproj
└── NBBottomSheet
│ ├── Sources
│ ├── NBConfiguration.swift
│ ├── NBBottomSheet.h
│ ├── NBBottomSheetTransitioningDelegate.swift
│ ├── NBBottomSheetDismissalTransition.swift
│ ├── NBBottomSheetController.swift
│ ├── NBBottomSheetPresentationTransition.swift
│ ├── NBBottomSheetConfiguration.swift
│ └── NBBottomSheetPresentationController.swift
│ └── Info.plist
├── Example
├── Example
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── TableView
│ │ ├── TableViewController.swift
│ │ └── TableViewController.xib
│ ├── Alert
│ │ ├── AlertViewController.swift
│ │ └── AlertViewController.xib
│ ├── Info.plist
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── DatePicker
│ │ └── DatePickerViewController.swift
│ ├── AppDelegate.swift
│ └── ViewController.swift
├── Example.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── project.pbxproj
└── ExampleUITests
│ ├── Info.plist
│ └── ExampleUITests.swift
├── Package.swift
├── NBBottomSheet.podspec
├── LICENSE
├── .gitignore
└── README.md
/NBBottomSheet/.swiftlint.yml:
--------------------------------------------------------------------------------
1 | disabled_rules:
2 | - line_length
3 |
4 | excluded:
5 | - Example
6 |
--------------------------------------------------------------------------------
/Example/Example/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/NBBottomSheet/NBBottomSheet.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/NBBottomSheet/NBBottomSheet.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/NBBottomSheet/NBBottomSheet/Sources/NBConfiguration.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NBConfiguration.swift
3 | // NBBottomSheet
4 | //
5 | // Created by Bichon, Nicolas on 2018-10-30.
6 | //
7 |
8 | import Foundation
9 |
10 | /// Internal configuration object.
11 | struct NBConfiguration {
12 |
13 | /// Singleton.
14 | static var shared: NBBottomSheetConfiguration = NBBottomSheetConfiguration()
15 | }
16 |
--------------------------------------------------------------------------------
/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version:5.0
2 |
3 | import PackageDescription
4 |
5 | let package = Package(
6 | name: "NBBottomSheet",
7 | platforms: [.iOS(.v9)],
8 | products: [
9 | .library(
10 | name: "NBBottomSheet",
11 | targets: ["NBBottomSheet"]
12 | )
13 | ],
14 | targets: [
15 | .target(
16 | name: "NBBottomSheet",
17 | path: "NBBottomSheet/NBBottomSheet/Sources"
18 | )
19 | ]
20 | )
21 |
--------------------------------------------------------------------------------
/NBBottomSheet/NBBottomSheet/Sources/NBBottomSheet.h:
--------------------------------------------------------------------------------
1 | //
2 | // NBBottomSheet.h
3 | // NBBottomSheet
4 | //
5 | // Created by Bichon, Nicolas on 2018-11-01.
6 | // Copyright © 2018 Nicolas Bichon. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for NBBottomSheet.
12 | FOUNDATION_EXPORT double NBBottomSheetVersionNumber;
13 |
14 | //! Project version string for NBBottomSheet.
15 | FOUNDATION_EXPORT const unsigned char NBBottomSheetVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Example/ExampleUITests/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 |
--------------------------------------------------------------------------------
/NBBottomSheet/NBBottomSheet/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.0
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 |
22 |
23 |
--------------------------------------------------------------------------------
/NBBottomSheet.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |spec|
2 | spec.name = 'NBBottomSheet'
3 | spec.version = '1.2.0'
4 | spec.license = { :type => 'MIT', :file => 'LICENSE' }
5 | spec.homepage = 'https://github.com/nicol3a/NBBottomSheet'
6 | spec.authors = { 'Nicolas Bichon' => 'bichon.nicolas@gmail.com' }
7 | spec.social_media_url = "http://twitter.com/nicol3a"
8 | spec.summary = 'An iOS library that presents a bottom sheet using Auto Layout.'
9 | spec.source = { :git => 'https://github.com/nicol3a/NBBottomSheet.git', :tag => spec.version.to_s }
10 | spec.source_files = 'NBBottomSheet/NBBottomSheet/Sources/**/*.{h,m,swift}'
11 | spec.framework = 'Foundation', 'UIKit'
12 | spec.platform = :ios
13 | spec.ios.deployment_target = '9.0'
14 | spec.requires_arc = true
15 | spec.swift_version = '5.0'
16 | end
17 |
--------------------------------------------------------------------------------
/NBBottomSheet/NBBottomSheet/Sources/NBBottomSheetTransitioningDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NBBottomSheetTransitioningDelegate.swift
3 | // NBBottomSheet
4 | //
5 | // Created by Bichon, Nicolas on 2018-10-02.
6 | //
7 |
8 | import UIKit
9 |
10 | class NBBottomSheetTransitioningDelegate: NSObject, UIViewControllerTransitioningDelegate {
11 | func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source: UIViewController) -> UIPresentationController? {
12 | return NBBottomSheetPresentationController(presentedViewController: presented, presenting: presenting)
13 | }
14 |
15 | func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
16 | return NBBottomSheetPresentationTransition()
17 | }
18 |
19 | func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
20 | return NBBottomSheetDismissalTransition()
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Nicolas Bichon
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 |
--------------------------------------------------------------------------------
/Example/Example/TableView/TableViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TableViewController.swift
3 | // NBIBottomSheet_Example
4 | //
5 | // Created by Bichon, Nicolas on 2018-10-02.
6 | // Copyright © 2018 CocoaPods. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class TableViewController: UIViewController {
12 |
13 | }
14 |
15 | // MARK: - UITableViewDataSource
16 | extension TableViewController: UITableViewDataSource {
17 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
18 | return 20
19 | }
20 |
21 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
22 | var cell = tableView.dequeueReusableCell(withIdentifier: "Cell")
23 | if cell == nil {
24 | cell = UITableViewCell(style: .default, reuseIdentifier: "Cell")
25 | if #available(iOS 13.0, *) {
26 | cell?.backgroundColor = .secondarySystemBackground
27 | }
28 | }
29 | cell?.textLabel?.text = "Row \(indexPath.row)"
30 | return cell!
31 | }
32 | }
33 |
34 | // MARK: - UITableViewDelegate
35 | extension TableViewController: UITableViewDelegate {
36 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
37 | dismiss(animated: true, completion: nil)
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Example/Example/Alert/AlertViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AlertViewController.swift
3 | // NBIBottomSheet_Example
4 | //
5 | // Created by Bichon, Nicolas on 2018-10-02.
6 | // Copyright © 2018 CocoaPods. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class AlertViewController: UIViewController {
12 |
13 | // MARK: - View Life Cycle
14 |
15 | override func viewDidLayoutSubviews() {
16 | super.viewDidLayoutSubviews()
17 |
18 | view.roundCorners([.topLeft, .topRight], radius: 15)
19 | }
20 |
21 | // MARK: - Actions
22 |
23 | @IBAction func dismissButtonTapped(sender: AnyObject?) {
24 | dismiss(animated: true, completion: nil)
25 | }
26 |
27 | }
28 |
29 | // MARK: - UIView extension
30 | private extension UIView {
31 | func roundCorners(_ corners: UIRectCorner, radius: CGFloat) {
32 | var rect = bounds
33 |
34 | // Increase height (only useful for the iPhone X for now)
35 | if #available(iOS 11.0, *) {
36 | if let window = UIApplication.shared.keyWindow {
37 | rect.size.height += window.safeAreaInsets.bottom
38 | }
39 | }
40 |
41 | let path = UIBezierPath(roundedRect: rect, byRoundingCorners: corners, cornerRadii: CGSize(width: radius, height: radius))
42 | let mask = CAShapeLayer()
43 | mask.path = path.cgPath
44 | layer.mask = mask
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/NBBottomSheet/NBBottomSheet/Sources/NBBottomSheetDismissalTransition.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NBBottomSheetDismissalTransition.swift
3 | // NBBottomSheet
4 | //
5 | // Created by Bichon, Nicolas on 2018-10-02.
6 | //
7 |
8 | import UIKit
9 |
10 | class NBBottomSheetDismissalTransition: NSObject, UIViewControllerAnimatedTransitioning {
11 | func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval {
12 | return NBConfiguration.shared.animationDuration
13 | }
14 |
15 | func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {
16 | let fromViewController = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.from)!
17 |
18 | let animationDuration = transitionDuration(using: transitionContext)
19 |
20 | UIView.animate(
21 | withDuration: animationDuration,
22 | delay: 0.0,
23 | usingSpringWithDamping: 1.0,
24 | initialSpringVelocity: 0.8,
25 | options: UIView.AnimationOptions.curveEaseOut,
26 | animations: {
27 | fromViewController.view.transform = CGAffineTransform(translationX: 0, y: fromViewController.view.frame.height)
28 | }, completion: { _ in
29 | transitionContext.completeTransition(!transitionContext.transitionWasCancelled)
30 | }
31 | )
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Example/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 | NBBottomSheet
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0.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 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/NBBottomSheet/NBBottomSheet/Sources/NBBottomSheetController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NBBottomSheetController.swift
3 | // NBBottomSheet
4 | //
5 | // Created by Bichon, Nicolas on 2018-10-02.
6 | //
7 |
8 | import UIKit
9 |
10 | /// `NBBottomSheetController` is an object that can be used to present bottom sheets.
11 | public class NBBottomSheetController: NSObject {
12 |
13 | /// Initializes a `NBBottomSheetController` object with a configuration.
14 | /// - Parameter configuration: The configuration struct that specifies how NBBottomSheet should be configured.
15 | public init(configuration: NBBottomSheetConfiguration? = nil) {
16 | if let configuration = configuration {
17 | NBConfiguration.shared = configuration
18 | }
19 |
20 | super.init()
21 | }
22 |
23 | /// Presents a bottom sheet view controller embedded in a navigation controller.
24 | /// - Parameters:
25 | /// - viewController: The presented view controller
26 | /// - containerViewController: The presenting view controller.
27 | public func present(_ viewController: UIViewController, on containerViewController: UIViewController, completion: (() -> Void)? = nil) {
28 | if viewController is UINavigationController {
29 | assertionFailure("Presenting 'UINavigationController' in a bottom sheet is not supported.")
30 | return
31 | }
32 |
33 | let bottomSheetTransitioningDelegate = NBBottomSheetTransitioningDelegate()
34 | viewController.transitioningDelegate = bottomSheetTransitioningDelegate
35 | viewController.modalPresentationStyle = .custom
36 |
37 | containerViewController.present(viewController, animated: true, completion: completion)
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.moved-aside
22 | *.xccheckout
23 | *.xcscmblueprint
24 |
25 | ## Obj-C/Swift specific
26 | *.hmap
27 | *.ipa
28 | *.dSYM.zip
29 | *.dSYM
30 |
31 | ## Playgrounds
32 | timeline.xctimeline
33 | playground.xcworkspace
34 |
35 | # Swift Package Manager
36 | #
37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
38 | # Packages/
39 | # Package.pins
40 | # Package.resolved
41 | .build/
42 |
43 | # CocoaPods
44 | #
45 | # We recommend against adding the Pods directory to your .gitignore. However
46 | # you should judge for yourself, the pros and cons are mentioned at:
47 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
48 | #
49 | # Pods/
50 |
51 | # Carthage
52 | #
53 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
54 | # Carthage/Checkouts
55 |
56 | Carthage/Build
57 |
58 | # fastlane
59 | #
60 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
61 | # screenshots whenever they are needed.
62 | # For more information about the recommended setup visit:
63 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
64 |
65 | fastlane/report.xml
66 | fastlane/Preview.html
67 | fastlane/screenshots/**/*.png
68 | fastlane/test_output
69 |
70 | .DS_Store
71 |
--------------------------------------------------------------------------------
/NBBottomSheet/NBBottomSheet/Sources/NBBottomSheetPresentationTransition.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NBBottomSheetPresentationTransition.swift
3 | // NBBottomSheet
4 | //
5 | // Created by Bichon, Nicolas on 2018-10-02.
6 | //
7 |
8 | import UIKit
9 |
10 | class NBBottomSheetPresentationTransition: NSObject, UIViewControllerAnimatedTransitioning {
11 | func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval {
12 | return NBConfiguration.shared.animationDuration
13 | }
14 |
15 | func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {
16 | let toViewController = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.to)!
17 | let containerView = transitionContext.containerView
18 |
19 | let animationDuration = transitionDuration(using: transitionContext)
20 |
21 | toViewController.view.transform = CGAffineTransform(translationX: 0, y: toViewController.view.frame.height)
22 | toViewController.view.layer.shadowColor = UIColor.black.cgColor
23 | toViewController.view.layer.shadowOffset = CGSize(width: 0.0, height: 2.0)
24 | toViewController.view.layer.shadowOpacity = 0.3
25 | toViewController.view.clipsToBounds = true
26 |
27 | containerView.addSubview(toViewController.view)
28 |
29 | UIView.animate(
30 | withDuration: animationDuration,
31 | delay: 0.0,
32 | usingSpringWithDamping: 1.0,
33 | initialSpringVelocity: 0.8,
34 | options: UIView.AnimationOptions.curveEaseOut,
35 | animations: {
36 | toViewController.view.transform = CGAffineTransform.identity
37 | }, completion: { finished in
38 | transitionContext.completeTransition(finished)
39 | }
40 | )
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/NBBottomSheet/NBBottomSheet/Sources/NBBottomSheetConfiguration.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NBBottomSheetConfiguration.swift
3 | // NBBottomSheet
4 | //
5 | // Created by Bichon, Nicolas on 2018-10-30.
6 | //
7 |
8 | import UIKit
9 |
10 | /// Encapsulates configuration information for the behavior of NBBottomSheet.
11 | public struct NBBottomSheetConfiguration {
12 |
13 | public enum SheetSize {
14 | case fixed(_ height: CGFloat)
15 | }
16 |
17 | /// The presentation and dismissal animation duration.
18 | public var animationDuration: TimeInterval = 0.0
19 |
20 | /// The sheet's size.
21 | public var sheetSize: SheetSize = .fixed(300)
22 |
23 | /// The background view's color.
24 | public var backgroundViewColor: UIColor = .clear
25 |
26 | /// The default presentation and dismissal animation duration.
27 | public static let defaultAnimationDuration: TimeInterval = 0.4
28 |
29 | /// The default sheet's size.
30 | public static let defaultSheetSize: SheetSize = .fixed(300)
31 |
32 | /// The default background view's color.
33 | public static let defaultBackgroundViewColor: UIColor = UIColor.black.withAlphaComponent(0.7)
34 |
35 | /// Initializes a `NBBottomSheetConfiguration` object with optionally customizable behaviors.
36 | /// - Parameters:
37 | /// - animationDuration: The presentation and dismissal animation duration.
38 | /// - sheetSize: The sheet's size.
39 | /// - backgroundViewAlpha: The background view's color.
40 | public init(animationDuration: TimeInterval = defaultAnimationDuration,
41 | sheetSize: SheetSize = defaultSheetSize,
42 | backgroundViewColor: UIColor = defaultBackgroundViewColor) {
43 | self.animationDuration = animationDuration
44 | self.sheetSize = sheetSize
45 | self.backgroundViewColor = backgroundViewColor
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/Example/Example/DatePicker/DatePickerViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DatePickerViewController.swift
3 | // NBIBottomSheet_Example
4 | //
5 | // Created by Bichon, Nicolas on 2018-10-02.
6 | // Copyright © 2018 CocoaPods. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class DatePickerViewController: UIViewController {
12 |
13 | // MARK: - Properties
14 |
15 | private let datePicker: UIDatePicker = {
16 | let datePicker = UIDatePicker(frame: .zero)
17 | datePicker.translatesAutoresizingMaskIntoConstraints = false
18 | datePicker.accessibilityIdentifier = "DatePickerBottomSheet"
19 | return datePicker
20 | }()
21 |
22 | // MARK: - View Life Cycle
23 |
24 | override func viewDidLoad() {
25 | super.viewDidLoad()
26 |
27 | if #available(iOS 13.0, *) {
28 | view.backgroundColor = .secondarySystemBackground
29 | } else {
30 | view.backgroundColor = .white
31 | }
32 | setupDatePicker()
33 | }
34 |
35 | private func setupDatePicker() {
36 | view.addSubview(datePicker)
37 |
38 | let heightConstraint = datePicker.heightAnchor.constraint(equalToConstant: 218)
39 | heightConstraint.priority = UILayoutPriority.defaultHigh
40 |
41 | NSLayoutConstraint.activate([
42 | heightConstraint,
43 | datePicker.topAnchor.constraint(equalTo: view.topAnchor),
44 | datePicker.leftAnchor.constraint(equalTo: view.leftAnchor),
45 | datePicker.rightAnchor.constraint(equalTo: view.rightAnchor)
46 | ])
47 |
48 | if #available(iOS 11, *) {
49 | let guide = view.safeAreaLayoutGuide
50 | NSLayoutConstraint.activate([
51 | datePicker.bottomAnchor.constraint(equalTo: guide.bottomAnchor, constant: -10.0)
52 | ])
53 | } else {
54 | NSLayoutConstraint.activate([
55 | datePicker.bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: -10.0)
56 | ])
57 | }
58 | }
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/Example/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/Example/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // Example
4 | //
5 | // Created by Bichon, Nicolas on 2018-11-02.
6 | // Copyright © 2018 Nicolas Bichon. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
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 | func applicationWillResignActive(_ application: UIApplication) {
22 | // 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.
23 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
24 | }
25 |
26 | func applicationDidEnterBackground(_ application: UIApplication) {
27 | // 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.
28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
29 | }
30 |
31 | func applicationWillEnterForeground(_ application: UIApplication) {
32 | // 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.
33 | }
34 |
35 | func applicationDidBecomeActive(_ application: UIApplication) {
36 | // 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.
37 | }
38 |
39 | func applicationWillTerminate(_ application: UIApplication) {
40 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
41 | }
42 |
43 | }
44 |
45 |
--------------------------------------------------------------------------------
/NBBottomSheet/NBBottomSheet.xcodeproj/xcshareddata/xcschemes/NBBottomSheet.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
45 |
46 |
52 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
70 |
71 |
72 |
73 |
75 |
76 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/Example/Example/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Example
4 | //
5 | // Created by Bichon, Nicolas on 2018-11-02.
6 | // Copyright © 2018 Nicolas Bichon. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import NBBottomSheet
11 |
12 | enum BottomSheetType: Int, CaseIterable {
13 | case alert
14 | case datePicker
15 | case tableView
16 |
17 | var title: String {
18 | switch self {
19 | case .alert:
20 | return "Alert example"
21 | case .datePicker:
22 | return "Date picker example"
23 | case .tableView:
24 | return "Table view example"
25 | }
26 | }
27 | }
28 |
29 | class ViewController: UIViewController {
30 |
31 | // MARK: - Properties
32 |
33 | @IBOutlet weak var tableView: UITableView!
34 |
35 | private let types: [BottomSheetType] = BottomSheetType.allCases
36 |
37 | // MARK: - View Life Cycle
38 |
39 | override func viewDidLoad() {
40 | super.viewDidLoad()
41 |
42 | setupTableView()
43 | }
44 |
45 | // MARK: - Setup
46 |
47 | private func setupTableView() {
48 | tableView.register(UITableViewCell.self, forCellReuseIdentifier: "BottomSheetTypeCell")
49 | }
50 |
51 | // MARK: - Actions
52 |
53 | private func presentBottomSheet(with type: BottomSheetType) {
54 | var viewController: UIViewController!
55 |
56 | var configuration: NBBottomSheetConfiguration
57 |
58 | switch type {
59 | case .alert:
60 | configuration = NBBottomSheetConfiguration(sheetSize: .fixed(143))
61 | viewController = AlertViewController()
62 | case .datePicker:
63 | configuration = NBBottomSheetConfiguration(sheetSize: .fixed(216))
64 | viewController = DatePickerViewController()
65 | case .tableView:
66 | configuration = NBBottomSheetConfiguration(sheetSize: .fixed(500))
67 | viewController = TableViewController()
68 | }
69 |
70 | let bottomSheetController = NBBottomSheetController(configuration: configuration)
71 | bottomSheetController.present(viewController, on: self)
72 | }
73 |
74 | }
75 |
76 | // MARK: - UITableViewDataSource
77 | extension ViewController: UITableViewDataSource {
78 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
79 | return types.count
80 | }
81 |
82 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
83 | let cell = tableView.dequeueReusableCell(withIdentifier: "BottomSheetTypeCell", for: indexPath)
84 |
85 | cell.accessoryType = .disclosureIndicator
86 | cell.textLabel?.text = BottomSheetType(rawValue: indexPath.row)?.title
87 |
88 | return cell
89 | }
90 | }
91 |
92 | // MARK: - UITableViewDelegate
93 | extension ViewController: UITableViewDelegate {
94 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
95 | tableView.deselectRow(at: indexPath, animated: true)
96 |
97 | if let type = BottomSheetType(rawValue: indexPath.row) {
98 | presentBottomSheet(with: type)
99 | }
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/Example/ExampleUITests/ExampleUITests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ExampleUITests.swift
3 | // ExampleUITests
4 | //
5 | // Created by Bichon, Nicolas on 2018-11-19.
6 | // Copyright © 2018 Nicolas Bichon. All rights reserved.
7 | //
8 |
9 | import XCTest
10 |
11 | class ExampleUITests: XCTestCase {
12 |
13 | var app: XCUIApplication!
14 |
15 | override func setUp() {
16 | continueAfterFailure = false
17 |
18 | app = XCUIApplication()
19 | app.launch()
20 | }
21 |
22 | func testOpeningAlertBottomSheet() {
23 | app.openAlertBottomSheet()
24 |
25 | XCTAssertTrue(app.isDisplayingAlertBottomSheet)
26 | }
27 |
28 | func testTappingDismissButtonDismissesAlertBottomSheet() {
29 | app.openAlertBottomSheet()
30 | app.buttons["Dismiss"].tap()
31 |
32 | XCTAssertFalse(app.isDisplayingAlertBottomSheet)
33 | }
34 |
35 | func testTappingOverlayDismissesAlertBottomSheet() {
36 | app.openAlertBottomSheet()
37 | app.tapOverlayToDismissBottomSheet()
38 |
39 | XCTAssertFalse(app.isDisplayingAlertBottomSheet)
40 | }
41 |
42 | func testOpeningDatePickerBottomSheet() {
43 | app.openDatePickerBottomSheet()
44 |
45 | XCTAssertTrue(app.isDisplayingDatePickerBottomSheet)
46 | }
47 |
48 | func testTappingOverlayDismissesDatePickerBottomSheet() {
49 | app.openDatePickerBottomSheet()
50 | app.tapOverlayToDismissBottomSheet()
51 |
52 | XCTAssertFalse(app.isDisplayingDatePickerBottomSheet)
53 | }
54 |
55 | func testOpeningTableViewBottomSheet() {
56 | app.openTableViewBottomSheet()
57 |
58 | XCTAssertTrue(app.isDisplayingTableViewBottomSheet)
59 | }
60 |
61 | func testSelectingRowDismissesTableViewBottomSheet() {
62 | app.openTableViewBottomSheet()
63 | app.tables["TableViewBottomSheet"].staticTexts["Row 0"].tap()
64 |
65 | XCTAssertFalse(app.isDisplayingTableViewBottomSheet)
66 | }
67 |
68 | func testTappingOverlayDismissesTableViewBottomSheet() {
69 | app.openTableViewBottomSheet()
70 | app.tapOverlayToDismissBottomSheet()
71 |
72 | XCTAssertFalse(app.isDisplayingTableViewBottomSheet)
73 | }
74 |
75 | }
76 |
77 | private extension XCUIApplication {
78 |
79 | var isDisplayingAlertBottomSheet: Bool {
80 | return staticTexts["Alert"].exists
81 | }
82 |
83 | var isDisplayingDatePickerBottomSheet: Bool {
84 | return datePickers["DatePickerBottomSheet"].exists
85 | }
86 |
87 | var isDisplayingTableViewBottomSheet: Bool {
88 | return tables["TableViewBottomSheet"].exists
89 | }
90 |
91 | func openAlertBottomSheet() {
92 | tables.staticTexts["Alert example"].tap()
93 | }
94 |
95 | func openDatePickerBottomSheet() {
96 | tables.staticTexts["Date picker example"].tap()
97 | }
98 |
99 | func openTableViewBottomSheet() {
100 | tables.staticTexts["Table view example"].tap()
101 | }
102 |
103 | func tapOverlayToDismissBottomSheet() {
104 | children(matching: .window).element(boundBy: 0).children(matching: .other).element(boundBy: 1).children(matching: .other).element(boundBy: 0).tap()
105 | }
106 |
107 | }
108 |
--------------------------------------------------------------------------------
/Example/Example/TableView/TableViewController.xib:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # NBBottomSheet
2 |
3 | [](https://github.com/Carthage/Carthage)
4 | [](http://cocoapods.org/pods/NBBottomSheet)
5 | [](https://developer.apple.com/swift/)
6 | [](http://www.apple.com/ios/)
7 | [](https://github.com/nicol3a/NBBottomSheet/blob/master/LICENSE)
8 |
9 | **NBBottomSheet** is an open-source iOS library that allows you to present a `UIViewController` in a bottom sheet.
10 |
11 | 
12 |
13 | ## Requirements
14 |
15 | * iOS 9.0+
16 | * Xcode 11+
17 | * Swift 5.0
18 |
19 | ## Installation
20 |
21 | ### CocoaPods
22 |
23 | To integrate NBBottomSheet into your Xcode project using [CocoaPods](http://cocoapods.org), specify it in your `Podfile`:
24 |
25 | ```ruby
26 | source 'https://github.com/CocoaPods/Specs.git'
27 | platform :ios, '9.0'
28 | use_frameworks!
29 |
30 | target 'YOUR_TARGET_NAME' do
31 | pod 'NBBottomSheet', '~> 1.2'
32 | end
33 |
34 | ```
35 |
36 | Then, run the following command:
37 |
38 | ```bash
39 | $ pod install
40 | ```
41 |
42 | ### Carthage
43 |
44 | To integrate NBBottomSheet into your Xcode project using [Carthage](https://github.com/Carthage/Carthage), specify it in your `Cartfile`:
45 |
46 | ```ogdl
47 | github "nicol3a/NBBottomSheet" ~> 1.1
48 | ```
49 |
50 | Then, run the following command:
51 |
52 | ```bash
53 | $ carthage update
54 | ```
55 |
56 | Drag the built `NBBottomSheet.framework` from the Carthage build folder into the “Embedded Binaries” section in the "General" panel of the application target.
57 |
58 | ### Manually
59 |
60 | Add NBBottomSheet as a git [submodule](http://git-scm.com/docs/git-submodule) by running the following command:
61 |
62 | ```bash
63 | $ git submodule add -b master https://github.com/nicol3a/NBBottomSheet.git
64 | ```
65 |
66 | Drag the `NBBottomSheet.xcodeproj` file into your project and add the `NBBottomSheet.framework` in the "Embedded Binaries" section in the "General" panel of the application target.
67 |
68 | ## Usage
69 |
70 | Initialize an instance of [`NBBottomSheetController`](https://github.com/nicol3a/NBBottomSheet/blob/master/NBBottomSheet/NBBottomSheet/Sources/NBBottomSheetController.swift):
71 |
72 | ```swift
73 | let bottomSheetController = NBBottomSheetController()
74 | ```
75 |
76 | To display a view controller in a bottom sheet, add the following code where you want to display the bottom sheet, passing the view controller to present and the container view controller:
77 |
78 | ```swift
79 | let viewController = AlertViewController()
80 | bottomSheetController.present(viewController, on: self)
81 | ```
82 |
83 | > **Note:** Be sure to keep a strong reference to your instance of [`NBBottomSheetController`](https://github.com/nicol3a/NBBottomSheet/blob/master/NBBottomSheet/NBBottomSheet/Sources/NBBottomSheetController.swift) for the duration of its use.
84 |
85 | If you don’t want to use [`NBBottomSheetController`](https://github.com/nicol3a/NBBottomSheet/blob/master/NBBottomSheet/NBBottomSheet/Sources/NBBottomSheetController.swift)’s default configuration, you can specify a [`NBBottomSheetConfiguration`](https://github.com/nicol3a/NBBottomSheet/blob/master/NBBottomSheet/NBBottomSheet/Sources/NBBottomSheetConfiguration.swift) instance on initialization of [`NBBottomSheetController`](https://github.com/nicol3a/NBBottomSheet/blob/master/NBBottomSheet/NBBottomSheet/Sources/NBBottomSheetController.swift).
86 |
87 | ```swift
88 | let configuration = NBBottomSheetConfiguration(animationDuration: 0.4, sheetSize: .fixed(300))
89 | let bottomSheetController = NBBottomSheetController(configuration: configuration)
90 | ```
91 |
92 | ## License
93 |
94 | NBBottomSheet is available under the MIT license. See the [`LICENSE`](https://github.com/nicol3a/NBBottomSheet/blob/master/LICENSE) file for more information.
95 |
96 | ## Acknowledgements
97 |
98 | - Created with ❤️ by [Nicolas Bichon](https://twitter.com/nicol3a)
--------------------------------------------------------------------------------
/NBBottomSheet/NBBottomSheet/Sources/NBBottomSheetPresentationController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NBBottomSheetPresentationController.swift
3 | // NBBottomSheet
4 | //
5 | // Created by Bichon, Nicolas on 2018-10-02.
6 | //
7 |
8 | import UIKit
9 |
10 | class NBBottomSheetPresentationController: UIPresentationController {
11 |
12 | // MARK: - Properties
13 |
14 | /// Overlay presented under the bottom sheet.
15 | private lazy var backgroundView: UIView? = {
16 | guard let containerView = containerView else {
17 | return nil
18 | }
19 |
20 | let backroundView = UIView(frame: containerView.bounds)
21 |
22 | backroundView.autoresizingMask = [.flexibleHeight, .flexibleWidth]
23 | backroundView.backgroundColor = NBConfiguration.shared.backgroundViewColor
24 |
25 | let gestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(dismiss))
26 | backroundView.addGestureRecognizer(gestureRecognizer)
27 |
28 | return backroundView
29 | }()
30 |
31 | // MARK: - Actions
32 |
33 | /// Dismisses the presented view controller.
34 | @objc func dismiss() {
35 | self.presentedViewController.dismiss(animated: true, completion: nil)
36 | }
37 |
38 | // MARK: - UIPresentationController
39 |
40 | override func containerViewWillLayoutSubviews() {
41 | guard let presentedView = presentedView, let containerView = containerView else { return }
42 |
43 | var bottomSheetHeight: CGFloat
44 |
45 | switch NBConfiguration.shared.sheetSize {
46 | case .fixed(let height):
47 | bottomSheetHeight = height
48 | }
49 |
50 | // Increase height (iPhone X/XS/11)
51 | if #available(iOS 11.0, *) {
52 | guard let window = UIApplication.shared.keyWindow else {
53 | return
54 | }
55 |
56 | bottomSheetHeight += window.safeAreaInsets.bottom
57 | }
58 |
59 | presentedView.frame = CGRect(x: 0, y: containerView.bounds.height - bottomSheetHeight, width: containerView.bounds.width, height: bottomSheetHeight)
60 | }
61 |
62 | override func presentationTransitionWillBegin() {
63 | super.presentationTransitionWillBegin()
64 |
65 | guard let containerView = containerView, let backgroundView = backgroundView, let presentedView = presentedView else {
66 | return
67 | }
68 |
69 | backgroundView.alpha = 0.0
70 |
71 | containerView.addSubview(backgroundView)
72 | containerView.addSubview(presentedView)
73 |
74 | let showBackgroundView = { (_: UIViewControllerTransitionCoordinatorContext) -> Void in
75 | backgroundView.alpha = 1.0
76 | }
77 |
78 | presentingViewController.transitionCoordinator?.animate(alongsideTransition: showBackgroundView, completion: nil)
79 | }
80 |
81 | override open func presentationTransitionDidEnd(_ completed: Bool) {
82 | if !completed {
83 | backgroundView?.removeFromSuperview()
84 | }
85 | }
86 |
87 | override open func dismissalTransitionWillBegin() {
88 | guard let backgroundView = backgroundView else {
89 | return
90 | }
91 |
92 | let hideBackgroundView = { (_: UIViewControllerTransitionCoordinatorContext) -> Void in
93 | backgroundView.alpha = 0.0
94 | }
95 |
96 | presentingViewController.transitionCoordinator?.animate(alongsideTransition: hideBackgroundView, completion: nil)
97 | }
98 |
99 | override open func dismissalTransitionDidEnd(_ completed: Bool) {
100 | if completed {
101 | backgroundView?.removeFromSuperview()
102 | }
103 | }
104 |
105 | override open func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
106 | super.viewWillTransition(to: size, with: coordinator)
107 |
108 | guard let containerView = containerView, let backgroundView = backgroundView else {
109 | return
110 | }
111 |
112 | let resetBackgroundViewFrame: ((UIViewControllerTransitionCoordinatorContext) -> Void) = { _ in
113 | backgroundView.frame = containerView.bounds
114 | }
115 |
116 | coordinator.animate(alongsideTransition: resetBackgroundViewFrame, completion: nil)
117 | }
118 | }
119 |
--------------------------------------------------------------------------------
/Example/Example/Alert/AlertViewController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
27 |
33 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/Example/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 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/NBBottomSheet/NBBottomSheet.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 2330F783218B6D6400F56789 /* NBBottomSheet.h in Headers */ = {isa = PBXBuildFile; fileRef = 2330F781218B6D6400F56789 /* NBBottomSheet.h */; settings = {ATTRIBUTES = (Public, ); }; };
11 | 2330F790218B6D7B00F56789 /* NBBottomSheetDismissalTransition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2330F789218B6D7B00F56789 /* NBBottomSheetDismissalTransition.swift */; };
12 | 2330F791218B6D7B00F56789 /* NBBottomSheetPresentationTransition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2330F78A218B6D7B00F56789 /* NBBottomSheetPresentationTransition.swift */; };
13 | 2330F792218B6D7B00F56789 /* NBBottomSheetTransitioningDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2330F78B218B6D7B00F56789 /* NBBottomSheetTransitioningDelegate.swift */; };
14 | 2330F793218B6D7B00F56789 /* NBBottomSheetPresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2330F78C218B6D7B00F56789 /* NBBottomSheetPresentationController.swift */; };
15 | 2330F794218B6D7B00F56789 /* NBConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2330F78D218B6D7B00F56789 /* NBConfiguration.swift */; };
16 | 2330F795218B6D7B00F56789 /* NBBottomSheetController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2330F78E218B6D7B00F56789 /* NBBottomSheetController.swift */; };
17 | 2330F796218B6D7B00F56789 /* NBBottomSheetConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2330F78F218B6D7B00F56789 /* NBBottomSheetConfiguration.swift */; };
18 | /* End PBXBuildFile section */
19 |
20 | /* Begin PBXFileReference section */
21 | 2330F77E218B6D6400F56789 /* NBBottomSheet.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = NBBottomSheet.framework; sourceTree = BUILT_PRODUCTS_DIR; };
22 | 2330F781218B6D6400F56789 /* NBBottomSheet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NBBottomSheet.h; sourceTree = ""; };
23 | 2330F782218B6D6400F56789 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
24 | 2330F789218B6D7B00F56789 /* NBBottomSheetDismissalTransition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NBBottomSheetDismissalTransition.swift; sourceTree = ""; };
25 | 2330F78A218B6D7B00F56789 /* NBBottomSheetPresentationTransition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NBBottomSheetPresentationTransition.swift; sourceTree = ""; };
26 | 2330F78B218B6D7B00F56789 /* NBBottomSheetTransitioningDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NBBottomSheetTransitioningDelegate.swift; sourceTree = ""; };
27 | 2330F78C218B6D7B00F56789 /* NBBottomSheetPresentationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NBBottomSheetPresentationController.swift; sourceTree = ""; };
28 | 2330F78D218B6D7B00F56789 /* NBConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NBConfiguration.swift; sourceTree = ""; };
29 | 2330F78E218B6D7B00F56789 /* NBBottomSheetController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NBBottomSheetController.swift; sourceTree = ""; };
30 | 2330F78F218B6D7B00F56789 /* NBBottomSheetConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NBBottomSheetConfiguration.swift; sourceTree = ""; };
31 | /* End PBXFileReference section */
32 |
33 | /* Begin PBXFrameworksBuildPhase section */
34 | 2330F77B218B6D6400F56789 /* Frameworks */ = {
35 | isa = PBXFrameworksBuildPhase;
36 | buildActionMask = 2147483647;
37 | files = (
38 | );
39 | runOnlyForDeploymentPostprocessing = 0;
40 | };
41 | /* End PBXFrameworksBuildPhase section */
42 |
43 | /* Begin PBXGroup section */
44 | 2330F774218B6D6400F56789 = {
45 | isa = PBXGroup;
46 | children = (
47 | 2330F780218B6D6400F56789 /* NBBottomSheet */,
48 | 2330F77F218B6D6400F56789 /* Products */,
49 | );
50 | sourceTree = "";
51 | };
52 | 2330F77F218B6D6400F56789 /* Products */ = {
53 | isa = PBXGroup;
54 | children = (
55 | 2330F77E218B6D6400F56789 /* NBBottomSheet.framework */,
56 | );
57 | name = Products;
58 | sourceTree = "";
59 | };
60 | 2330F780218B6D6400F56789 /* NBBottomSheet */ = {
61 | isa = PBXGroup;
62 | children = (
63 | 2330F797218B6DCB00F56789 /* Sources */,
64 | 2330F782218B6D6400F56789 /* Info.plist */,
65 | );
66 | path = NBBottomSheet;
67 | sourceTree = "";
68 | };
69 | 2330F797218B6DCB00F56789 /* Sources */ = {
70 | isa = PBXGroup;
71 | children = (
72 | 2330F78F218B6D7B00F56789 /* NBBottomSheetConfiguration.swift */,
73 | 2330F78E218B6D7B00F56789 /* NBBottomSheetController.swift */,
74 | 2330F789218B6D7B00F56789 /* NBBottomSheetDismissalTransition.swift */,
75 | 2330F78C218B6D7B00F56789 /* NBBottomSheetPresentationController.swift */,
76 | 2330F78A218B6D7B00F56789 /* NBBottomSheetPresentationTransition.swift */,
77 | 2330F78B218B6D7B00F56789 /* NBBottomSheetTransitioningDelegate.swift */,
78 | 2330F78D218B6D7B00F56789 /* NBConfiguration.swift */,
79 | 2330F781218B6D6400F56789 /* NBBottomSheet.h */,
80 | );
81 | path = Sources;
82 | sourceTree = "";
83 | };
84 | /* End PBXGroup section */
85 |
86 | /* Begin PBXHeadersBuildPhase section */
87 | 2330F779218B6D6400F56789 /* Headers */ = {
88 | isa = PBXHeadersBuildPhase;
89 | buildActionMask = 2147483647;
90 | files = (
91 | 2330F783218B6D6400F56789 /* NBBottomSheet.h in Headers */,
92 | );
93 | runOnlyForDeploymentPostprocessing = 0;
94 | };
95 | /* End PBXHeadersBuildPhase section */
96 |
97 | /* Begin PBXNativeTarget section */
98 | 2330F77D218B6D6400F56789 /* NBBottomSheet */ = {
99 | isa = PBXNativeTarget;
100 | buildConfigurationList = 2330F786218B6D6400F56789 /* Build configuration list for PBXNativeTarget "NBBottomSheet" */;
101 | buildPhases = (
102 | 2330F779218B6D6400F56789 /* Headers */,
103 | 2330F77A218B6D6400F56789 /* Sources */,
104 | 2330F77B218B6D6400F56789 /* Frameworks */,
105 | 2330F77C218B6D6400F56789 /* Resources */,
106 | 231D1275218E5416002C5750 /* Swiftlint */,
107 | );
108 | buildRules = (
109 | );
110 | dependencies = (
111 | );
112 | name = NBBottomSheet;
113 | productName = NBBottomSheet;
114 | productReference = 2330F77E218B6D6400F56789 /* NBBottomSheet.framework */;
115 | productType = "com.apple.product-type.framework";
116 | };
117 | /* End PBXNativeTarget section */
118 |
119 | /* Begin PBXProject section */
120 | 2330F775218B6D6400F56789 /* Project object */ = {
121 | isa = PBXProject;
122 | attributes = {
123 | LastUpgradeCheck = 1010;
124 | ORGANIZATIONNAME = "Nicolas Bichon";
125 | TargetAttributes = {
126 | 2330F77D218B6D6400F56789 = {
127 | CreatedOnToolsVersion = 10.1;
128 | LastSwiftMigration = 1020;
129 | };
130 | };
131 | };
132 | buildConfigurationList = 2330F778218B6D6400F56789 /* Build configuration list for PBXProject "NBBottomSheet" */;
133 | compatibilityVersion = "Xcode 9.3";
134 | developmentRegion = en;
135 | hasScannedForEncodings = 0;
136 | knownRegions = (
137 | en,
138 | Base,
139 | );
140 | mainGroup = 2330F774218B6D6400F56789;
141 | productRefGroup = 2330F77F218B6D6400F56789 /* Products */;
142 | projectDirPath = "";
143 | projectRoot = "";
144 | targets = (
145 | 2330F77D218B6D6400F56789 /* NBBottomSheet */,
146 | );
147 | };
148 | /* End PBXProject section */
149 |
150 | /* Begin PBXResourcesBuildPhase section */
151 | 2330F77C218B6D6400F56789 /* Resources */ = {
152 | isa = PBXResourcesBuildPhase;
153 | buildActionMask = 2147483647;
154 | files = (
155 | );
156 | runOnlyForDeploymentPostprocessing = 0;
157 | };
158 | /* End PBXResourcesBuildPhase section */
159 |
160 | /* Begin PBXShellScriptBuildPhase section */
161 | 231D1275218E5416002C5750 /* Swiftlint */ = {
162 | isa = PBXShellScriptBuildPhase;
163 | buildActionMask = 2147483647;
164 | files = (
165 | );
166 | inputFileListPaths = (
167 | );
168 | inputPaths = (
169 | );
170 | name = Swiftlint;
171 | outputFileListPaths = (
172 | );
173 | outputPaths = (
174 | );
175 | runOnlyForDeploymentPostprocessing = 0;
176 | shellPath = /bin/sh;
177 | shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
178 | };
179 | /* End PBXShellScriptBuildPhase section */
180 |
181 | /* Begin PBXSourcesBuildPhase section */
182 | 2330F77A218B6D6400F56789 /* Sources */ = {
183 | isa = PBXSourcesBuildPhase;
184 | buildActionMask = 2147483647;
185 | files = (
186 | 2330F795218B6D7B00F56789 /* NBBottomSheetController.swift in Sources */,
187 | 2330F793218B6D7B00F56789 /* NBBottomSheetPresentationController.swift in Sources */,
188 | 2330F794218B6D7B00F56789 /* NBConfiguration.swift in Sources */,
189 | 2330F796218B6D7B00F56789 /* NBBottomSheetConfiguration.swift in Sources */,
190 | 2330F790218B6D7B00F56789 /* NBBottomSheetDismissalTransition.swift in Sources */,
191 | 2330F792218B6D7B00F56789 /* NBBottomSheetTransitioningDelegate.swift in Sources */,
192 | 2330F791218B6D7B00F56789 /* NBBottomSheetPresentationTransition.swift in Sources */,
193 | );
194 | runOnlyForDeploymentPostprocessing = 0;
195 | };
196 | /* End PBXSourcesBuildPhase section */
197 |
198 | /* Begin XCBuildConfiguration section */
199 | 2330F784218B6D6400F56789 /* Debug */ = {
200 | isa = XCBuildConfiguration;
201 | buildSettings = {
202 | ALWAYS_SEARCH_USER_PATHS = NO;
203 | CLANG_ANALYZER_NONNULL = YES;
204 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
205 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
206 | CLANG_CXX_LIBRARY = "libc++";
207 | CLANG_ENABLE_MODULES = YES;
208 | CLANG_ENABLE_OBJC_ARC = YES;
209 | CLANG_ENABLE_OBJC_WEAK = YES;
210 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
211 | CLANG_WARN_BOOL_CONVERSION = YES;
212 | CLANG_WARN_COMMA = YES;
213 | CLANG_WARN_CONSTANT_CONVERSION = YES;
214 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
215 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
216 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
217 | CLANG_WARN_EMPTY_BODY = YES;
218 | CLANG_WARN_ENUM_CONVERSION = YES;
219 | CLANG_WARN_INFINITE_RECURSION = YES;
220 | CLANG_WARN_INT_CONVERSION = YES;
221 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
222 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
223 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
224 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
225 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
226 | CLANG_WARN_STRICT_PROTOTYPES = YES;
227 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
228 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
229 | CLANG_WARN_UNREACHABLE_CODE = YES;
230 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
231 | CODE_SIGN_IDENTITY = "iPhone Developer";
232 | COPY_PHASE_STRIP = NO;
233 | CURRENT_PROJECT_VERSION = 1;
234 | DEBUG_INFORMATION_FORMAT = dwarf;
235 | ENABLE_STRICT_OBJC_MSGSEND = YES;
236 | ENABLE_TESTABILITY = YES;
237 | GCC_C_LANGUAGE_STANDARD = gnu11;
238 | GCC_DYNAMIC_NO_PIC = NO;
239 | GCC_NO_COMMON_BLOCKS = YES;
240 | GCC_OPTIMIZATION_LEVEL = 0;
241 | GCC_PREPROCESSOR_DEFINITIONS = (
242 | "DEBUG=1",
243 | "$(inherited)",
244 | );
245 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
246 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
247 | GCC_WARN_UNDECLARED_SELECTOR = YES;
248 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
249 | GCC_WARN_UNUSED_FUNCTION = YES;
250 | GCC_WARN_UNUSED_VARIABLE = YES;
251 | IPHONEOS_DEPLOYMENT_TARGET = 12.1;
252 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
253 | MTL_FAST_MATH = YES;
254 | ONLY_ACTIVE_ARCH = YES;
255 | SDKROOT = iphoneos;
256 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
257 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
258 | VERSIONING_SYSTEM = "apple-generic";
259 | VERSION_INFO_PREFIX = "";
260 | };
261 | name = Debug;
262 | };
263 | 2330F785218B6D6400F56789 /* Release */ = {
264 | isa = XCBuildConfiguration;
265 | buildSettings = {
266 | ALWAYS_SEARCH_USER_PATHS = NO;
267 | CLANG_ANALYZER_NONNULL = YES;
268 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
269 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
270 | CLANG_CXX_LIBRARY = "libc++";
271 | CLANG_ENABLE_MODULES = YES;
272 | CLANG_ENABLE_OBJC_ARC = YES;
273 | CLANG_ENABLE_OBJC_WEAK = YES;
274 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
275 | CLANG_WARN_BOOL_CONVERSION = YES;
276 | CLANG_WARN_COMMA = YES;
277 | CLANG_WARN_CONSTANT_CONVERSION = YES;
278 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
279 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
280 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
281 | CLANG_WARN_EMPTY_BODY = YES;
282 | CLANG_WARN_ENUM_CONVERSION = YES;
283 | CLANG_WARN_INFINITE_RECURSION = YES;
284 | CLANG_WARN_INT_CONVERSION = YES;
285 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
286 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
287 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
288 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
289 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
290 | CLANG_WARN_STRICT_PROTOTYPES = YES;
291 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
292 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
293 | CLANG_WARN_UNREACHABLE_CODE = YES;
294 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
295 | CODE_SIGN_IDENTITY = "iPhone Developer";
296 | COPY_PHASE_STRIP = NO;
297 | CURRENT_PROJECT_VERSION = 1;
298 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
299 | ENABLE_NS_ASSERTIONS = NO;
300 | ENABLE_STRICT_OBJC_MSGSEND = YES;
301 | GCC_C_LANGUAGE_STANDARD = gnu11;
302 | GCC_NO_COMMON_BLOCKS = YES;
303 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
304 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
305 | GCC_WARN_UNDECLARED_SELECTOR = YES;
306 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
307 | GCC_WARN_UNUSED_FUNCTION = YES;
308 | GCC_WARN_UNUSED_VARIABLE = YES;
309 | IPHONEOS_DEPLOYMENT_TARGET = 12.1;
310 | MTL_ENABLE_DEBUG_INFO = NO;
311 | MTL_FAST_MATH = YES;
312 | SDKROOT = iphoneos;
313 | SWIFT_COMPILATION_MODE = wholemodule;
314 | SWIFT_OPTIMIZATION_LEVEL = "-O";
315 | VALIDATE_PRODUCT = YES;
316 | VERSIONING_SYSTEM = "apple-generic";
317 | VERSION_INFO_PREFIX = "";
318 | };
319 | name = Release;
320 | };
321 | 2330F787218B6D6400F56789 /* Debug */ = {
322 | isa = XCBuildConfiguration;
323 | buildSettings = {
324 | CLANG_ENABLE_MODULES = YES;
325 | CODE_SIGN_IDENTITY = "";
326 | CODE_SIGN_STYLE = Automatic;
327 | DEFINES_MODULE = YES;
328 | DEVELOPMENT_TEAM = "";
329 | DYLIB_COMPATIBILITY_VERSION = 1;
330 | DYLIB_CURRENT_VERSION = 1;
331 | DYLIB_INSTALL_NAME_BASE = "@rpath";
332 | INFOPLIST_FILE = NBBottomSheet/Info.plist;
333 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
334 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
335 | LD_RUNPATH_SEARCH_PATHS = (
336 | "$(inherited)",
337 | "@executable_path/Frameworks",
338 | "@loader_path/Frameworks",
339 | );
340 | PRODUCT_BUNDLE_IDENTIFIER = com.nicolasbichon.NBBottomSheet;
341 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
342 | SKIP_INSTALL = YES;
343 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
344 | SWIFT_VERSION = 5.0;
345 | TARGETED_DEVICE_FAMILY = "1,2";
346 | };
347 | name = Debug;
348 | };
349 | 2330F788218B6D6400F56789 /* Release */ = {
350 | isa = XCBuildConfiguration;
351 | buildSettings = {
352 | CLANG_ENABLE_MODULES = YES;
353 | CODE_SIGN_IDENTITY = "";
354 | CODE_SIGN_STYLE = Automatic;
355 | DEFINES_MODULE = YES;
356 | DEVELOPMENT_TEAM = "";
357 | DYLIB_COMPATIBILITY_VERSION = 1;
358 | DYLIB_CURRENT_VERSION = 1;
359 | DYLIB_INSTALL_NAME_BASE = "@rpath";
360 | INFOPLIST_FILE = NBBottomSheet/Info.plist;
361 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
362 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
363 | LD_RUNPATH_SEARCH_PATHS = (
364 | "$(inherited)",
365 | "@executable_path/Frameworks",
366 | "@loader_path/Frameworks",
367 | );
368 | PRODUCT_BUNDLE_IDENTIFIER = com.nicolasbichon.NBBottomSheet;
369 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
370 | SKIP_INSTALL = YES;
371 | SWIFT_VERSION = 5.0;
372 | TARGETED_DEVICE_FAMILY = "1,2";
373 | };
374 | name = Release;
375 | };
376 | /* End XCBuildConfiguration section */
377 |
378 | /* Begin XCConfigurationList section */
379 | 2330F778218B6D6400F56789 /* Build configuration list for PBXProject "NBBottomSheet" */ = {
380 | isa = XCConfigurationList;
381 | buildConfigurations = (
382 | 2330F784218B6D6400F56789 /* Debug */,
383 | 2330F785218B6D6400F56789 /* Release */,
384 | );
385 | defaultConfigurationIsVisible = 0;
386 | defaultConfigurationName = Release;
387 | };
388 | 2330F786218B6D6400F56789 /* Build configuration list for PBXNativeTarget "NBBottomSheet" */ = {
389 | isa = XCConfigurationList;
390 | buildConfigurations = (
391 | 2330F787218B6D6400F56789 /* Debug */,
392 | 2330F788218B6D6400F56789 /* Release */,
393 | );
394 | defaultConfigurationIsVisible = 0;
395 | defaultConfigurationName = Release;
396 | };
397 | /* End XCConfigurationList section */
398 | };
399 | rootObject = 2330F775218B6D6400F56789 /* Project object */;
400 | }
401 |
--------------------------------------------------------------------------------
/Example/Example.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 231D126A218E4776002C5750 /* AlertViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231D1261218E4776002C5750 /* AlertViewController.swift */; };
11 | 231D126D218E4776002C5750 /* TableViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 231D1264218E4776002C5750 /* TableViewController.xib */; };
12 | 231D126E218E4776002C5750 /* DatePickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231D1265218E4776002C5750 /* DatePickerViewController.swift */; };
13 | 231D126F218E4776002C5750 /* AlertViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 231D1266218E4776002C5750 /* AlertViewController.xib */; };
14 | 231D1271218E4776002C5750 /* TableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231D1268218E4776002C5750 /* TableViewController.swift */; };
15 | 235D42C4218CBD7300363CBA /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 235D42C3218CBD7300363CBA /* AppDelegate.swift */; };
16 | 235D42C6218CBD7300363CBA /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 235D42C5218CBD7300363CBA /* ViewController.swift */; };
17 | 235D42C9218CBD7300363CBA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 235D42C7218CBD7300363CBA /* Main.storyboard */; };
18 | 235D42CB218CBD7400363CBA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 235D42CA218CBD7400363CBA /* Assets.xcassets */; };
19 | 235D42CE218CBD7400363CBA /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 235D42CC218CBD7400363CBA /* LaunchScreen.storyboard */; };
20 | 235D42DB218CBE3300363CBA /* NBBottomSheet.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 235D42DA218CBDC300363CBA /* NBBottomSheet.framework */; };
21 | 235D42DC218CBE3300363CBA /* NBBottomSheet.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 235D42DA218CBDC300363CBA /* NBBottomSheet.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
22 | 239E4A8821A382660009D5B5 /* ExampleUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 239E4A8721A382660009D5B5 /* ExampleUITests.swift */; };
23 | /* End PBXBuildFile section */
24 |
25 | /* Begin PBXContainerItemProxy section */
26 | 235D42D9218CBDC300363CBA /* PBXContainerItemProxy */ = {
27 | isa = PBXContainerItemProxy;
28 | containerPortal = 235D42D5218CBDC300363CBA /* NBBottomSheet.xcodeproj */;
29 | proxyType = 2;
30 | remoteGlobalIDString = 2330F77E218B6D6400F56789;
31 | remoteInfo = NBBottomSheet;
32 | };
33 | 235D42DD218CBE3300363CBA /* PBXContainerItemProxy */ = {
34 | isa = PBXContainerItemProxy;
35 | containerPortal = 235D42D5218CBDC300363CBA /* NBBottomSheet.xcodeproj */;
36 | proxyType = 1;
37 | remoteGlobalIDString = 2330F77D218B6D6400F56789;
38 | remoteInfo = NBBottomSheet;
39 | };
40 | 239E4A8221A3823B0009D5B5 /* PBXContainerItemProxy */ = {
41 | isa = PBXContainerItemProxy;
42 | containerPortal = 235D42B8218CBD7300363CBA /* Project object */;
43 | proxyType = 1;
44 | remoteGlobalIDString = 235D42BF218CBD7300363CBA;
45 | remoteInfo = Example;
46 | };
47 | /* End PBXContainerItemProxy section */
48 |
49 | /* Begin PBXCopyFilesBuildPhase section */
50 | 235D42DF218CBE3300363CBA /* Embed Frameworks */ = {
51 | isa = PBXCopyFilesBuildPhase;
52 | buildActionMask = 2147483647;
53 | dstPath = "";
54 | dstSubfolderSpec = 10;
55 | files = (
56 | 235D42DC218CBE3300363CBA /* NBBottomSheet.framework in Embed Frameworks */,
57 | );
58 | name = "Embed Frameworks";
59 | runOnlyForDeploymentPostprocessing = 0;
60 | };
61 | /* End PBXCopyFilesBuildPhase section */
62 |
63 | /* Begin PBXFileReference section */
64 | 231D1261218E4776002C5750 /* AlertViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlertViewController.swift; sourceTree = ""; };
65 | 231D1264218E4776002C5750 /* TableViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TableViewController.xib; sourceTree = ""; };
66 | 231D1265218E4776002C5750 /* DatePickerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatePickerViewController.swift; sourceTree = ""; };
67 | 231D1266218E4776002C5750 /* AlertViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AlertViewController.xib; sourceTree = ""; };
68 | 231D1268218E4776002C5750 /* TableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableViewController.swift; sourceTree = ""; };
69 | 235D42C0218CBD7300363CBA /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
70 | 235D42C3218CBD7300363CBA /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
71 | 235D42C5218CBD7300363CBA /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
72 | 235D42C8218CBD7300363CBA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
73 | 235D42CA218CBD7400363CBA /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
74 | 235D42CD218CBD7400363CBA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
75 | 235D42CF218CBD7400363CBA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
76 | 235D42D5218CBDC300363CBA /* NBBottomSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = NBBottomSheet.xcodeproj; path = ../NBBottomSheet/NBBottomSheet.xcodeproj; sourceTree = ""; };
77 | 239E4A7D21A3823B0009D5B5 /* ExampleUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ExampleUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
78 | 239E4A8121A3823B0009D5B5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
79 | 239E4A8721A382660009D5B5 /* ExampleUITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExampleUITests.swift; sourceTree = ""; };
80 | /* End PBXFileReference section */
81 |
82 | /* Begin PBXFrameworksBuildPhase section */
83 | 235D42BD218CBD7300363CBA /* Frameworks */ = {
84 | isa = PBXFrameworksBuildPhase;
85 | buildActionMask = 2147483647;
86 | files = (
87 | 235D42DB218CBE3300363CBA /* NBBottomSheet.framework in Frameworks */,
88 | );
89 | runOnlyForDeploymentPostprocessing = 0;
90 | };
91 | 239E4A7A21A3823B0009D5B5 /* Frameworks */ = {
92 | isa = PBXFrameworksBuildPhase;
93 | buildActionMask = 2147483647;
94 | files = (
95 | );
96 | runOnlyForDeploymentPostprocessing = 0;
97 | };
98 | /* End PBXFrameworksBuildPhase section */
99 |
100 | /* Begin PBXGroup section */
101 | 231D1272218E4ADB002C5750 /* Alert */ = {
102 | isa = PBXGroup;
103 | children = (
104 | 231D1261218E4776002C5750 /* AlertViewController.swift */,
105 | 231D1266218E4776002C5750 /* AlertViewController.xib */,
106 | );
107 | path = Alert;
108 | sourceTree = "";
109 | };
110 | 231D1273218E4AE9002C5750 /* DatePicker */ = {
111 | isa = PBXGroup;
112 | children = (
113 | 231D1265218E4776002C5750 /* DatePickerViewController.swift */,
114 | );
115 | path = DatePicker;
116 | sourceTree = "";
117 | };
118 | 231D1274218E4AF5002C5750 /* TableView */ = {
119 | isa = PBXGroup;
120 | children = (
121 | 231D1268218E4776002C5750 /* TableViewController.swift */,
122 | 231D1264218E4776002C5750 /* TableViewController.xib */,
123 | );
124 | path = TableView;
125 | sourceTree = "";
126 | };
127 | 235D42B7218CBD7300363CBA = {
128 | isa = PBXGroup;
129 | children = (
130 | 235D42C2218CBD7300363CBA /* Example */,
131 | 239E4A7E21A3823B0009D5B5 /* ExampleUITests */,
132 | 235D42C1218CBD7300363CBA /* Products */,
133 | 235D42D5218CBDC300363CBA /* NBBottomSheet.xcodeproj */,
134 | );
135 | sourceTree = "";
136 | };
137 | 235D42C1218CBD7300363CBA /* Products */ = {
138 | isa = PBXGroup;
139 | children = (
140 | 235D42C0218CBD7300363CBA /* Example.app */,
141 | 239E4A7D21A3823B0009D5B5 /* ExampleUITests.xctest */,
142 | );
143 | name = Products;
144 | sourceTree = "";
145 | };
146 | 235D42C2218CBD7300363CBA /* Example */ = {
147 | isa = PBXGroup;
148 | children = (
149 | 235D42C3218CBD7300363CBA /* AppDelegate.swift */,
150 | 235D42C5218CBD7300363CBA /* ViewController.swift */,
151 | 231D1272218E4ADB002C5750 /* Alert */,
152 | 231D1273218E4AE9002C5750 /* DatePicker */,
153 | 231D1274218E4AF5002C5750 /* TableView */,
154 | 235D42C7218CBD7300363CBA /* Main.storyboard */,
155 | 235D42CA218CBD7400363CBA /* Assets.xcassets */,
156 | 235D42CC218CBD7400363CBA /* LaunchScreen.storyboard */,
157 | 235D42CF218CBD7400363CBA /* Info.plist */,
158 | );
159 | path = Example;
160 | sourceTree = "";
161 | };
162 | 235D42D6218CBDC300363CBA /* Products */ = {
163 | isa = PBXGroup;
164 | children = (
165 | 235D42DA218CBDC300363CBA /* NBBottomSheet.framework */,
166 | );
167 | name = Products;
168 | sourceTree = "";
169 | };
170 | 239E4A7E21A3823B0009D5B5 /* ExampleUITests */ = {
171 | isa = PBXGroup;
172 | children = (
173 | 239E4A8721A382660009D5B5 /* ExampleUITests.swift */,
174 | 239E4A8121A3823B0009D5B5 /* Info.plist */,
175 | );
176 | path = ExampleUITests;
177 | sourceTree = "";
178 | };
179 | /* End PBXGroup section */
180 |
181 | /* Begin PBXNativeTarget section */
182 | 235D42BF218CBD7300363CBA /* Example */ = {
183 | isa = PBXNativeTarget;
184 | buildConfigurationList = 235D42D2218CBD7400363CBA /* Build configuration list for PBXNativeTarget "Example" */;
185 | buildPhases = (
186 | 235D42BC218CBD7300363CBA /* Sources */,
187 | 235D42BD218CBD7300363CBA /* Frameworks */,
188 | 235D42BE218CBD7300363CBA /* Resources */,
189 | 235D42DF218CBE3300363CBA /* Embed Frameworks */,
190 | );
191 | buildRules = (
192 | );
193 | dependencies = (
194 | 235D42DE218CBE3300363CBA /* PBXTargetDependency */,
195 | );
196 | name = Example;
197 | productName = Example;
198 | productReference = 235D42C0218CBD7300363CBA /* Example.app */;
199 | productType = "com.apple.product-type.application";
200 | };
201 | 239E4A7C21A3823B0009D5B5 /* ExampleUITests */ = {
202 | isa = PBXNativeTarget;
203 | buildConfigurationList = 239E4A8421A3823B0009D5B5 /* Build configuration list for PBXNativeTarget "ExampleUITests" */;
204 | buildPhases = (
205 | 239E4A7921A3823B0009D5B5 /* Sources */,
206 | 239E4A7A21A3823B0009D5B5 /* Frameworks */,
207 | 239E4A7B21A3823B0009D5B5 /* Resources */,
208 | );
209 | buildRules = (
210 | );
211 | dependencies = (
212 | 239E4A8321A3823B0009D5B5 /* PBXTargetDependency */,
213 | );
214 | name = ExampleUITests;
215 | productName = ExampleUITests;
216 | productReference = 239E4A7D21A3823B0009D5B5 /* ExampleUITests.xctest */;
217 | productType = "com.apple.product-type.bundle.ui-testing";
218 | };
219 | /* End PBXNativeTarget section */
220 |
221 | /* Begin PBXProject section */
222 | 235D42B8218CBD7300363CBA /* Project object */ = {
223 | isa = PBXProject;
224 | attributes = {
225 | LastSwiftUpdateCheck = 1010;
226 | LastUpgradeCheck = 1010;
227 | ORGANIZATIONNAME = "Nicolas Bichon";
228 | TargetAttributes = {
229 | 235D42BF218CBD7300363CBA = {
230 | CreatedOnToolsVersion = 10.1;
231 | LastSwiftMigration = 1020;
232 | };
233 | 239E4A7C21A3823B0009D5B5 = {
234 | CreatedOnToolsVersion = 10.1;
235 | LastSwiftMigration = 1020;
236 | TestTargetID = 235D42BF218CBD7300363CBA;
237 | };
238 | };
239 | };
240 | buildConfigurationList = 235D42BB218CBD7300363CBA /* Build configuration list for PBXProject "Example" */;
241 | compatibilityVersion = "Xcode 9.3";
242 | developmentRegion = en;
243 | hasScannedForEncodings = 0;
244 | knownRegions = (
245 | en,
246 | Base,
247 | );
248 | mainGroup = 235D42B7218CBD7300363CBA;
249 | productRefGroup = 235D42C1218CBD7300363CBA /* Products */;
250 | projectDirPath = "";
251 | projectReferences = (
252 | {
253 | ProductGroup = 235D42D6218CBDC300363CBA /* Products */;
254 | ProjectRef = 235D42D5218CBDC300363CBA /* NBBottomSheet.xcodeproj */;
255 | },
256 | );
257 | projectRoot = "";
258 | targets = (
259 | 235D42BF218CBD7300363CBA /* Example */,
260 | 239E4A7C21A3823B0009D5B5 /* ExampleUITests */,
261 | );
262 | };
263 | /* End PBXProject section */
264 |
265 | /* Begin PBXReferenceProxy section */
266 | 235D42DA218CBDC300363CBA /* NBBottomSheet.framework */ = {
267 | isa = PBXReferenceProxy;
268 | fileType = wrapper.framework;
269 | path = NBBottomSheet.framework;
270 | remoteRef = 235D42D9218CBDC300363CBA /* PBXContainerItemProxy */;
271 | sourceTree = BUILT_PRODUCTS_DIR;
272 | };
273 | /* End PBXReferenceProxy section */
274 |
275 | /* Begin PBXResourcesBuildPhase section */
276 | 235D42BE218CBD7300363CBA /* Resources */ = {
277 | isa = PBXResourcesBuildPhase;
278 | buildActionMask = 2147483647;
279 | files = (
280 | 235D42CE218CBD7400363CBA /* LaunchScreen.storyboard in Resources */,
281 | 231D126D218E4776002C5750 /* TableViewController.xib in Resources */,
282 | 235D42CB218CBD7400363CBA /* Assets.xcassets in Resources */,
283 | 235D42C9218CBD7300363CBA /* Main.storyboard in Resources */,
284 | 231D126F218E4776002C5750 /* AlertViewController.xib in Resources */,
285 | );
286 | runOnlyForDeploymentPostprocessing = 0;
287 | };
288 | 239E4A7B21A3823B0009D5B5 /* Resources */ = {
289 | isa = PBXResourcesBuildPhase;
290 | buildActionMask = 2147483647;
291 | files = (
292 | );
293 | runOnlyForDeploymentPostprocessing = 0;
294 | };
295 | /* End PBXResourcesBuildPhase section */
296 |
297 | /* Begin PBXSourcesBuildPhase section */
298 | 235D42BC218CBD7300363CBA /* Sources */ = {
299 | isa = PBXSourcesBuildPhase;
300 | buildActionMask = 2147483647;
301 | files = (
302 | 235D42C6218CBD7300363CBA /* ViewController.swift in Sources */,
303 | 231D1271218E4776002C5750 /* TableViewController.swift in Sources */,
304 | 231D126E218E4776002C5750 /* DatePickerViewController.swift in Sources */,
305 | 231D126A218E4776002C5750 /* AlertViewController.swift in Sources */,
306 | 235D42C4218CBD7300363CBA /* AppDelegate.swift in Sources */,
307 | );
308 | runOnlyForDeploymentPostprocessing = 0;
309 | };
310 | 239E4A7921A3823B0009D5B5 /* Sources */ = {
311 | isa = PBXSourcesBuildPhase;
312 | buildActionMask = 2147483647;
313 | files = (
314 | 239E4A8821A382660009D5B5 /* ExampleUITests.swift in Sources */,
315 | );
316 | runOnlyForDeploymentPostprocessing = 0;
317 | };
318 | /* End PBXSourcesBuildPhase section */
319 |
320 | /* Begin PBXTargetDependency section */
321 | 235D42DE218CBE3300363CBA /* PBXTargetDependency */ = {
322 | isa = PBXTargetDependency;
323 | name = NBBottomSheet;
324 | targetProxy = 235D42DD218CBE3300363CBA /* PBXContainerItemProxy */;
325 | };
326 | 239E4A8321A3823B0009D5B5 /* PBXTargetDependency */ = {
327 | isa = PBXTargetDependency;
328 | target = 235D42BF218CBD7300363CBA /* Example */;
329 | targetProxy = 239E4A8221A3823B0009D5B5 /* PBXContainerItemProxy */;
330 | };
331 | /* End PBXTargetDependency section */
332 |
333 | /* Begin PBXVariantGroup section */
334 | 235D42C7218CBD7300363CBA /* Main.storyboard */ = {
335 | isa = PBXVariantGroup;
336 | children = (
337 | 235D42C8218CBD7300363CBA /* Base */,
338 | );
339 | name = Main.storyboard;
340 | sourceTree = "";
341 | };
342 | 235D42CC218CBD7400363CBA /* LaunchScreen.storyboard */ = {
343 | isa = PBXVariantGroup;
344 | children = (
345 | 235D42CD218CBD7400363CBA /* Base */,
346 | );
347 | name = LaunchScreen.storyboard;
348 | sourceTree = "";
349 | };
350 | /* End PBXVariantGroup section */
351 |
352 | /* Begin XCBuildConfiguration section */
353 | 235D42D0218CBD7400363CBA /* Debug */ = {
354 | isa = XCBuildConfiguration;
355 | buildSettings = {
356 | ALWAYS_SEARCH_USER_PATHS = NO;
357 | CLANG_ANALYZER_NONNULL = YES;
358 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
359 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
360 | CLANG_CXX_LIBRARY = "libc++";
361 | CLANG_ENABLE_MODULES = YES;
362 | CLANG_ENABLE_OBJC_ARC = YES;
363 | CLANG_ENABLE_OBJC_WEAK = YES;
364 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
365 | CLANG_WARN_BOOL_CONVERSION = YES;
366 | CLANG_WARN_COMMA = YES;
367 | CLANG_WARN_CONSTANT_CONVERSION = YES;
368 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
369 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
370 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
371 | CLANG_WARN_EMPTY_BODY = YES;
372 | CLANG_WARN_ENUM_CONVERSION = YES;
373 | CLANG_WARN_INFINITE_RECURSION = YES;
374 | CLANG_WARN_INT_CONVERSION = YES;
375 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
376 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
377 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
378 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
379 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
380 | CLANG_WARN_STRICT_PROTOTYPES = YES;
381 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
382 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
383 | CLANG_WARN_UNREACHABLE_CODE = YES;
384 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
385 | CODE_SIGN_IDENTITY = "iPhone Developer";
386 | COPY_PHASE_STRIP = NO;
387 | DEBUG_INFORMATION_FORMAT = dwarf;
388 | ENABLE_STRICT_OBJC_MSGSEND = YES;
389 | ENABLE_TESTABILITY = YES;
390 | GCC_C_LANGUAGE_STANDARD = gnu11;
391 | GCC_DYNAMIC_NO_PIC = NO;
392 | GCC_NO_COMMON_BLOCKS = YES;
393 | GCC_OPTIMIZATION_LEVEL = 0;
394 | GCC_PREPROCESSOR_DEFINITIONS = (
395 | "DEBUG=1",
396 | "$(inherited)",
397 | );
398 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
399 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
400 | GCC_WARN_UNDECLARED_SELECTOR = YES;
401 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
402 | GCC_WARN_UNUSED_FUNCTION = YES;
403 | GCC_WARN_UNUSED_VARIABLE = YES;
404 | IPHONEOS_DEPLOYMENT_TARGET = 12.1;
405 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
406 | MTL_FAST_MATH = YES;
407 | ONLY_ACTIVE_ARCH = YES;
408 | SDKROOT = iphoneos;
409 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
410 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
411 | };
412 | name = Debug;
413 | };
414 | 235D42D1218CBD7400363CBA /* Release */ = {
415 | isa = XCBuildConfiguration;
416 | buildSettings = {
417 | ALWAYS_SEARCH_USER_PATHS = NO;
418 | CLANG_ANALYZER_NONNULL = YES;
419 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
420 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
421 | CLANG_CXX_LIBRARY = "libc++";
422 | CLANG_ENABLE_MODULES = YES;
423 | CLANG_ENABLE_OBJC_ARC = YES;
424 | CLANG_ENABLE_OBJC_WEAK = YES;
425 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
426 | CLANG_WARN_BOOL_CONVERSION = YES;
427 | CLANG_WARN_COMMA = YES;
428 | CLANG_WARN_CONSTANT_CONVERSION = YES;
429 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
430 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
431 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
432 | CLANG_WARN_EMPTY_BODY = YES;
433 | CLANG_WARN_ENUM_CONVERSION = YES;
434 | CLANG_WARN_INFINITE_RECURSION = YES;
435 | CLANG_WARN_INT_CONVERSION = YES;
436 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
437 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
438 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
439 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
440 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
441 | CLANG_WARN_STRICT_PROTOTYPES = YES;
442 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
443 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
444 | CLANG_WARN_UNREACHABLE_CODE = YES;
445 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
446 | CODE_SIGN_IDENTITY = "iPhone Developer";
447 | COPY_PHASE_STRIP = NO;
448 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
449 | ENABLE_NS_ASSERTIONS = NO;
450 | ENABLE_STRICT_OBJC_MSGSEND = YES;
451 | GCC_C_LANGUAGE_STANDARD = gnu11;
452 | GCC_NO_COMMON_BLOCKS = YES;
453 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
454 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
455 | GCC_WARN_UNDECLARED_SELECTOR = YES;
456 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
457 | GCC_WARN_UNUSED_FUNCTION = YES;
458 | GCC_WARN_UNUSED_VARIABLE = YES;
459 | IPHONEOS_DEPLOYMENT_TARGET = 12.1;
460 | MTL_ENABLE_DEBUG_INFO = NO;
461 | MTL_FAST_MATH = YES;
462 | SDKROOT = iphoneos;
463 | SWIFT_COMPILATION_MODE = wholemodule;
464 | SWIFT_OPTIMIZATION_LEVEL = "-O";
465 | VALIDATE_PRODUCT = YES;
466 | };
467 | name = Release;
468 | };
469 | 235D42D3218CBD7400363CBA /* Debug */ = {
470 | isa = XCBuildConfiguration;
471 | buildSettings = {
472 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
473 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
474 | CLANG_ENABLE_MODULES = YES;
475 | CODE_SIGN_STYLE = Automatic;
476 | DEVELOPMENT_TEAM = "";
477 | INFOPLIST_FILE = Example/Info.plist;
478 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
479 | LD_RUNPATH_SEARCH_PATHS = (
480 | "$(inherited)",
481 | "@executable_path/Frameworks",
482 | );
483 | PRODUCT_BUNDLE_IDENTIFIER = com.nicolasbichon.Example;
484 | PRODUCT_NAME = "$(TARGET_NAME)";
485 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
486 | SWIFT_VERSION = 5.0;
487 | TARGETED_DEVICE_FAMILY = "1,2";
488 | };
489 | name = Debug;
490 | };
491 | 235D42D4218CBD7400363CBA /* Release */ = {
492 | isa = XCBuildConfiguration;
493 | buildSettings = {
494 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
495 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
496 | CLANG_ENABLE_MODULES = YES;
497 | CODE_SIGN_STYLE = Automatic;
498 | DEVELOPMENT_TEAM = "";
499 | INFOPLIST_FILE = Example/Info.plist;
500 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
501 | LD_RUNPATH_SEARCH_PATHS = (
502 | "$(inherited)",
503 | "@executable_path/Frameworks",
504 | );
505 | PRODUCT_BUNDLE_IDENTIFIER = com.nicolasbichon.Example;
506 | PRODUCT_NAME = "$(TARGET_NAME)";
507 | SWIFT_VERSION = 5.0;
508 | TARGETED_DEVICE_FAMILY = "1,2";
509 | };
510 | name = Release;
511 | };
512 | 239E4A8521A3823B0009D5B5 /* Debug */ = {
513 | isa = XCBuildConfiguration;
514 | buildSettings = {
515 | CODE_SIGN_STYLE = Automatic;
516 | INFOPLIST_FILE = ExampleUITests/Info.plist;
517 | LD_RUNPATH_SEARCH_PATHS = (
518 | "$(inherited)",
519 | "@executable_path/Frameworks",
520 | "@loader_path/Frameworks",
521 | );
522 | PRODUCT_BUNDLE_IDENTIFIER = com.nicolasbichon..ExampleUITests;
523 | PRODUCT_NAME = "$(TARGET_NAME)";
524 | SWIFT_VERSION = 5.0;
525 | TARGETED_DEVICE_FAMILY = "1,2";
526 | TEST_TARGET_NAME = Example;
527 | };
528 | name = Debug;
529 | };
530 | 239E4A8621A3823B0009D5B5 /* Release */ = {
531 | isa = XCBuildConfiguration;
532 | buildSettings = {
533 | CODE_SIGN_STYLE = Automatic;
534 | INFOPLIST_FILE = ExampleUITests/Info.plist;
535 | LD_RUNPATH_SEARCH_PATHS = (
536 | "$(inherited)",
537 | "@executable_path/Frameworks",
538 | "@loader_path/Frameworks",
539 | );
540 | PRODUCT_BUNDLE_IDENTIFIER = com.nicolasbichon..ExampleUITests;
541 | PRODUCT_NAME = "$(TARGET_NAME)";
542 | SWIFT_VERSION = 5.0;
543 | TARGETED_DEVICE_FAMILY = "1,2";
544 | TEST_TARGET_NAME = Example;
545 | };
546 | name = Release;
547 | };
548 | /* End XCBuildConfiguration section */
549 |
550 | /* Begin XCConfigurationList section */
551 | 235D42BB218CBD7300363CBA /* Build configuration list for PBXProject "Example" */ = {
552 | isa = XCConfigurationList;
553 | buildConfigurations = (
554 | 235D42D0218CBD7400363CBA /* Debug */,
555 | 235D42D1218CBD7400363CBA /* Release */,
556 | );
557 | defaultConfigurationIsVisible = 0;
558 | defaultConfigurationName = Release;
559 | };
560 | 235D42D2218CBD7400363CBA /* Build configuration list for PBXNativeTarget "Example" */ = {
561 | isa = XCConfigurationList;
562 | buildConfigurations = (
563 | 235D42D3218CBD7400363CBA /* Debug */,
564 | 235D42D4218CBD7400363CBA /* Release */,
565 | );
566 | defaultConfigurationIsVisible = 0;
567 | defaultConfigurationName = Release;
568 | };
569 | 239E4A8421A3823B0009D5B5 /* Build configuration list for PBXNativeTarget "ExampleUITests" */ = {
570 | isa = XCConfigurationList;
571 | buildConfigurations = (
572 | 239E4A8521A3823B0009D5B5 /* Debug */,
573 | 239E4A8621A3823B0009D5B5 /* Release */,
574 | );
575 | defaultConfigurationIsVisible = 0;
576 | defaultConfigurationName = Release;
577 | };
578 | /* End XCConfigurationList section */
579 | };
580 | rootObject = 235D42B8218CBD7300363CBA /* Project object */;
581 | }
582 |
--------------------------------------------------------------------------------