Latest 1.0.3
License MIT
Platforms ios 9.0, requires ARC
Frameworks Foundation, UIKit

Carthage Compatible
CocoaPods Compatible
Swift 5.0

NBBottomSheet is an open-source iOS library that allows you to present a UIViewController in a bottom sheet.

The library relies on Auto Layout to calculate the size of the bottom sheet.



  • iOS 9.0+
  • Xcode 11+
  • Swift 5.0



To integrate NBBottomSheet into your Xcode project using CocoaPods, specify it in your Podfile:

source ''
platform :ios, '9.0'

target 'YOUR_TARGET_NAME' do
    pod 'NBBottomSheet', '~> 1.0'

Then, run the following command:

$ pod install


To integrate NBBottomSheet into your Xcode project using Carthage, specify it in your Cartfile:

github "nicol3a/NBBottomSheet" ~> 1.0

Then, run the following command:

$ carthage update

Drag the built NBBottomSheet.framework from the Carthage build folder into the “Embedded Binaries” section in the "General" panel of the application target.


Add NBBottomSheet as a git submodule by running the following command:

$ git submodule add -b master

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.


Initialize an instance of NBBottomSheetController:

let bottomSheetController = NBBottomSheetController()

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:

let viewController = AlertViewController()
bottomSheetController.present(viewController, on: self)

Note: Be sure to keep a strong reference to your instance of NBBottomSheetController for the duration of its use.

If you don’t want to use NBBottomSheetController’s default configuration, you can specify a NBBottomSheetConfiguration instance on initialization of NBBottomSheetController.

let configuration = NBBottomSheetConfiguration(animationDuration: 0.4)
let bottomSheetController = NBBottomSheetController(configuration: configuration)

Auto Layout

The library relies on the view controller’s Auto Layout constraints to calculate the size of the bottom sheet being presented.

You can either:

  • use Storyboards or xibs to create your view controller and set the Size to "Freeform" ("Simulated Metrics" section in the "Attributes inspector" panel),
  • or you can create your view programmatically.


NBBottomSheet is available under the MIT license. See the LICENSE file for more information.


Latest podspec

    "name": "NBBottomSheet",
    "version": "1.0.3",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "homepage": "",
    "authors": {
        "Nicolas Bichon": "[email protected]"
    "social_media_url": "",
    "summary": "An iOS library that presents a bottom sheet using Auto Layout.",
    "source": {
        "git": "",
        "tag": "1.0.3"
    "source_files": "NBBottomSheet/NBBottomSheet/Sources/**/*.{h,m,swift}",
    "frameworks": [
    "platforms": {
        "ios": "9.0"
    "requires_arc": true,
    "swift_version": "5.0"

Pin It on Pinterest

Share This