All Projects → ShashikantBhadke → SBDropDown

ShashikantBhadke / SBDropDown

Licence: MIT license
Simple DropDown framework ...

Programming Languages

Makefile
30231 projects

Projects that are alternatives of or similar to SBDropDown

Core Components
Accessible and lightweight Javascript components
Stars: ✭ 85 (+304.76%)
Mutual labels:  datepicker, dropdown
Popper Core
🍿 JavaScript positioning library for tooltips, popovers, dropdowns, and more
Stars: ✭ 18,903 (+89914.29%)
Mutual labels:  dropdown, popovers
React Input Enhancements
Set of enhancements for input control
Stars: ✭ 1,375 (+6447.62%)
Mutual labels:  datepicker, dropdown
Ng Bootstrap
Angular powered Bootstrap
Stars: ✭ 7,872 (+37385.71%)
Mutual labels:  datepicker, dropdown
floating-ui
A low-level toolkit to create floating elements. Tooltips, popovers, dropdowns, and more
Stars: ✭ 23,485 (+111733.33%)
Mutual labels:  dropdown, popovers
PygameWidgets
A module for use with Pygame. Includes fully customisable buttons, textboxes, sliders and many more, as well as the ability to create and run animations on these widgets.
Stars: ✭ 34 (+61.9%)
Mutual labels:  dropdown
imrc-datetime-picker
(Improved) React component datetime picker by momentjs 📆
Stars: ✭ 21 (+0%)
Mutual labels:  datepicker
react-native-picker-box
Simple and configurable component picker for react native
Stars: ✭ 0 (-100%)
Mutual labels:  dropdown
TypePicker
A date picker use in web and react-native
Stars: ✭ 14 (-33.33%)
Mutual labels:  datepicker
XPopupExt
XPopup扩展功能库,基于XPopup强大的弹窗能力和PickerView的选择器逻辑,封装了时间选择器弹窗、城市选择器弹窗和条件选择器。
Stars: ✭ 248 (+1080.95%)
Mutual labels:  datepicker
react-native-panel
A Customizable React Native Panel for Android and iOS
Stars: ✭ 35 (+66.67%)
Mutual labels:  dropdown
qing
🍧一个UI组件库。包括 { 日期选择器组件 } { 时间选择器组件 } { 分页组件 } { 树组件 } { 级联选择器组件 } { 表单组件 } 等,ES6语法编写,原生模块化
Stars: ✭ 71 (+238.1%)
Mutual labels:  datepicker
mithril-datepicker
Pick a date! But only if you're using Mithril. (component for Mithril.js ^v1.0)
Stars: ✭ 23 (+9.52%)
Mutual labels:  datepicker
Menu
The most customizable menu for macOS apps.
Stars: ✭ 84 (+300%)
Mutual labels:  dropdown
flutter date picker
A Cupertino style date picker for Android and IOS
Stars: ✭ 78 (+271.43%)
Mutual labels:  datepicker
react-native-daterange-picker
A React Native component for picking date ranges or single dates.
Stars: ✭ 86 (+309.52%)
Mutual labels:  datepicker
jquery-date-dropdowns
A simple, customisable jQuery datepicker plugin to dynamically generate separate "day", "month" and "year" dropdowns, and provide a formatted date string for form submission
Stars: ✭ 42 (+100%)
Mutual labels:  datepicker
elm-ui-dropdown
Dropdown module for Elm UI
Stars: ✭ 20 (-4.76%)
Mutual labels:  dropdown
PersianDateRangePicker
Select range of date and time in the Persian
Stars: ✭ 41 (+95.24%)
Mutual labels:  datepicker
react-functional-select
Micro-sized & micro-optimized select component for React.js
Stars: ✭ 165 (+685.71%)
Mutual labels:  dropdown

SBDropDown

Issue Forks CocoaPods Compatible License Open Source Helpers codecov

Simple dropDown for date and _ array.

Sample1 Video Sample

Documentation

Usage Video Link

Custom Text DropDown

  1. To show DropDown with respect with to sourceView and sourceRect (optional)
    let strTitle = "My Title"
    let arrEmements = ["Value 1", "Value 2", "Value 3"] 
    self.showSBDropDown(strTitle: strTitle, arrSelectedIndex: [2], arrElemets: arrEmements, sourceView: sender, key: "myKey")

where,

  • strTitle :- Is the title of dropDown list.
  • arrElemets :- Array of you normal or complicated model.
  • arrSelectedIndex :- Array of your selected indices if any else set [].
  • sourceView :- DropDown arrow is pointing to this view and you haven't provided sourceRect then sourceView.bounds is used instead of this
  • key :- Extra key if that you may want it for differentiate from others
  1. After this you have to define delegate methods for SBProtocol which are already confirmed at start.
    configCellFor(currentIndex: Int, arrSelectedIndex: [Int], currentData: Any, cell: SBTableCell, key: Any?)

If you provide array of string then no need to set this. I have done your work for that😅. where,

  • currentIndex :- As name say's it is current Index 😜
  • arrSelectedIndex :- As this framework is also support for multi selection. So that it that it has multiple selected indices.
  • currentData :- Object that you are using to set on dropDrown.
  • cell :- Table view cell of class SBTableCell is for data set with you custom check mark icon and to change alignment of lable.
  • key :- Extra key if that you may want it for differentiate from others

For Example,

    // MARK:- Extension for SBTableProtocol
    extension ViewController: SBTableProtocol {
        func configCellFor(currentIndex: Int, arrSelectedIndex: [Int], currentData: Any, cell: SBTableCell, key: Any?) {
            guard isCallSetUP else { return }
            if let str = currentData as? String {
                cell.lblTitle.text = str
                cell.imgSelected = #imageLiteral(resourceName: "correct")
                cell.isSelected(arrSelectedIndex.contains(currentIndex))
            }
            
            if let clr = currentData as? UIColor {
                cell.lblTitle.backgroundColor = clr
                cell.lblTitle.text = ""
                cell.imgSelected = #imageLiteral(resourceName: "correct")
                cell.isSelected(arrSelectedIndex.contains(currentIndex))
            }
        }
        
     ....
     
    } //extension

Now the second method is

    didSelectCell(currentIndex: Int, arrSelectedIndex: [Int], currentData: Any, key: Any?)

where,

  • currentIndex :- As name say's it is current Index 😜

  • arrSelectedIndex :- As this framework is also support for multi selection. So that it that it has multiple selected indices.

  • currentData :- Object that you are using to set on dropDrown.

  • key :- Extra key if that you may want it for differentiate from others

    This methods is called when user tap on any dropDown list this method is triggerd same like table view didSelect methods

And the last dropDown delegate methods is

    btnSelectSBProtocolPressed(arrSelectedIndex: [Int], arrElements: [Any], key: Any?)

where,

  • arrSelectedIndex :- As this framework is also support for multi selection. So that it that it has multiple selected indices.

  • arrElemets :- Array of you normal or complicated model which you send at start.

  • key :- Extra key if that you may want it for differentiate from others

    This methods is called when user tap's on select button.

  1. (Optional) Drop down Arrow Direction
    You can change drop down arrow direction as below,
    SBDropDown.shared.arrowDirection = .down

or

    SBDropDown.shared.arrowDirection = [.up, .down]
  1. (Optional) Select Button Properties...
    To show or hide SBDropDown.shared.isShowSelectButton = true // false. To change titile SBDropDown.shared.strSelectBtnTitle = "My New Title". To change width SBDropDown.shared.cgSelectButtonWidth = 180. To change or title color SBDropDown.shared.selectBtnColor = UIColor.blue. To change or background color SBDropDown.shared.selectBGBtnColor = UIColor.white.

  2. Selecetion type (Default is Multi Selection): To change this you need to set SBDropDown.shared.isMultiSelect = true // false

  3. To disable on double tap set SBDropDown.shared.isClearOnDoubleTab = false

Date & Time DropDown

  1. And you are ready to use it date and time drop down as below,
    self.showDatePicker(sourceView: sender)

or

    self.showSBDatePicker(strTitle: "Select DOB", currentDate: Date(), minDate: nil, maxDate: nil, sourceView: sender, sourceRect: sender.bounds)
  1. You can also modify time and date format that show on dropDown segment... like
    SBDropDown.shared.strTimeFormatter = "HH:mm a" 
    SBDropDown.shared.strDateFormatter = "dd-MM-yyyy"

And above format is default 😅.

  1. There are 3 optional delegate methods for protocol called SBDateProtocol as below,
    didSBDateValueChanged(date: Date)

this gives when user change date picker value.

    btnSBSelectPressed(date: Date)

this methods called when user taps on Select btn.

    btnSBSelectDateOption(type: SBDateEnum)

this methods returns when user taps on data, time ordatetime as well

Requirements

  • iOS 10.0+
  • Xcode 10.2+
  • Swift 5+

Installation

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate SBDropDown into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'SBDropDown'

License

SBDropDown is released under the MIT license. See LICENSE for details.

NOTE:- In demo app pod is removed so please install it before use.. Thanks😀 Again

HaPPy😃 to HeAr🤔 fRom yoU...😁....

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].