Coder Social home page Coder Social logo

bottom-sheet's Introduction

SwiftUI BottomSheet

GitHub tag (latest SemVer) License

preview preview

Usage

Same way as you use Sheet in SwiftUI

NavigationView {
    List(0..<20) {
        Text("\($0)")
    }.listStyle(PlainListStyle())
    .bottomSheet(isPresented: $isPresented, height: 300) {
        List(20..<40) { Text("\($0)") }.listStyle(PlainListStyle())
    }
    .navigationBarTitle("Bottom Sheet")
    .navigationBarItems(
        trailing: Button(action: { self.isPresented = true }) {
            Text("Show")
        }
    )
}

Example

Both demo preview code are available in example project.

To run the example project, clone this repo, and open iOS Example.xcworkspace from the iOS Example directory.

Installation

📱 iOS 13.0+

Swift Package Manager

To install BottomSheet using Swift Package Manager, add .package(name: "BottomSheet", url: "https://github.com/weitieda/bottom-sheet", from: "1.0.0")," to your Package.swift, then follow the integration tutorial here.

CocoaPods

To install BottomSheet using CocoaPods, add pod 'BottomSheet', :git => 'https://github.com/weitieda/bottom-sheet.git' to your Podfile, then follow the integration tutorial here.

License

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

bottom-sheet's People

Contributors

4brunu avatar avgx avatar getogrand avatar marcusadriano avatar melle avatar weitieda avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.