Code Monkey home page Code Monkey logo

bottomactionsheet's Introduction

Sheet Bottom Picker

Picker form bottom you can find datePicker or any item picker, or you can add view what you want like table view or collectioncView you can used in both way by delegate or block to listen to result selection.

You can find it in Appetize

Installing

Add blow for your pod file

pod 'ChtarBottomSheet' 
run pod update

###Getting Started

A step by step series of examples that tell you have to get a development env running

Say what the step will be

import ChtarBottomSheet

1- date picker

        SheetPicker.init(datePickerWithBlock : "Done" ,mode: .dateAndTime, local: Locale.init(identifier: "en"), onCompletion: { (date) in
                    print(date)
                })
        /// you can use it with delegate conform to  SheetPickerDateDelegate
        SheetPicker.init(datePickerWithDelegate: "ok", mode: .time, local: Locale.init(identifier: "ar"), delegate: self)
        

2- normal picker with any data Type

     SheetPicker.init(sheetPickerWithdblock: "Done", dataSource: [1,2,3]) { (index) in

            print(index)
        }
        
        /// or use it with delegate 
        
         SheetPicker.init(sheetPickerWithdelegate: "Done", delegate: <#T##SheetPickerDelegate#>, dataSource: ["male","female"])
  

2- for use any custome view inside it


  let bundle = Bundle(for: type(of: self))
     let nib = UINib(nibName: "TableView", bundle: bundle)
     let view = nib.instantiate(withOwner: self, options: nil)[0] as! TableViewTest
     
     let cellNib = UINib(nibName: "TableCell", bundle: nil)
     view.tableViewData.register(cellNib, forCellReuseIdentifier: "cellTableID")
     
      view.tableViewData.delegate = myPresenter
      view.tableViewData.dataSource = myPresenter
      view.layer.cornerRadius = 12
     // custome piker
    var  customePicker =  SheetPicker.init(CustomePickerWithdblock: "hhh", customView: view,height : 300)
     
     customePicker.show()

you should get like this result

Screenshot Screenshot Screenshot Screenshot

Screenshot

Author

You can find me in linked in

bottomactionsheet's People

Contributors

ragaie avatar

Stargazers

MohsinAli avatar

Watchers

MohsinAli avatar  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.