All Projects → DevYeom → YYBottomSheet

DevYeom / YYBottomSheet

Licence: MIT license
Simple and Clear BottomSheet

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to YYBottomSheet

Anylayer
Android稳定高效的浮层创建管理框架
Stars: ✭ 745 (+1555.56%)
Mutual labels:  toast, bottomsheet
react-native-whc-toast
A react native module to show toast alert, it works on iOS and Android.
Stars: ✭ 20 (-55.56%)
Mutual labels:  toast
bs5-utils
A JavaScript utility package for Bootstrap 5 components.
Stars: ✭ 26 (-42.22%)
Mutual labels:  toast
TableViewExtension
This extension simplify registering any cell, reusing and other verbosity steps.
Stars: ✭ 13 (-71.11%)
Mutual labels:  tableview
BottomSheetBehavior
BottomSheetBehavior is an android library extracted from the Google I/O 2018 application source code.
Stars: ✭ 12 (-73.33%)
Mutual labels:  bottomsheet
react-awesome-toasts
Toast notifications for react.
Stars: ✭ 64 (+42.22%)
Mutual labels:  toast
BottomSheet
A BottomSheet component made with UIKit. Completely written in Swift 🧡
Stars: ✭ 62 (+37.78%)
Mutual labels:  bottomsheet
vue-dk-toast
Lightweight toast-notification plugin for Vue 3 🍞
Stars: ✭ 23 (-48.89%)
Mutual labels:  toast
MapTable-Swift
Mimic Find My Friends first screen behavior
Stars: ✭ 69 (+53.33%)
Mutual labels:  tableview
ReactiveDataDisplayManager
No description or website provided.
Stars: ✭ 35 (-22.22%)
Mutual labels:  tableview
IZJHorizontalTableView
一个支持添加横向滑动切换ScrollView的tableView,并且保持原有垂直方向视图加载的View。可实现仿微博iOS,转转iOS等切换效果
Stars: ✭ 14 (-68.89%)
Mutual labels:  tableview
BottomSheet
A sliding Sheet from the bottom of the Screen with 3 States build with SwiftUI.
Stars: ✭ 597 (+1226.67%)
Mutual labels:  bottomsheet
SplittableViewKit
A cell of IndexPath(row: 0, section: 0) in UITableView is automatically moved to left view when device rotated.
Stars: ✭ 39 (-13.33%)
Mutual labels:  tableview
MaterialDesign-Toast
Custom android Toast with Material Design
Stars: ✭ 70 (+55.56%)
Mutual labels:  toast
Google-Maps-BottomSheet
A BottomSheetBehavior framework mirroring Google Maps'
Stars: ✭ 75 (+66.67%)
Mutual labels:  bottomsheet
xxy
xxy xxy.js alert 移动端弹窗 弹窗 上拉加载 下拉刷新 移动端UI 轮播 banner
Stars: ✭ 84 (+86.67%)
Mutual labels:  toast
ZXTableView
快速、高效地构建TableView,节省80%以上重复代码,无需设置数据源和代理。
Stars: ✭ 18 (-60%)
Mutual labels:  tableview
QuickWebKit
A great & strong plugin based WebViewController. 一款基于插件的 WebView 视图控制器,您可以基于它设计您的浏览器插件,然后像积木一样来组装它们。
Stars: ✭ 29 (-35.56%)
Mutual labels:  toast
toast2.js
A JavaScript toast component.
Stars: ✭ 15 (-66.67%)
Mutual labels:  toast
RTL-Toast
Android Toast For RTL Applications
Stars: ✭ 16 (-64.44%)
Mutual labels:  toast

YYBottomSheet

Swift Version SwiftPM License Platform

Introduction

When you need to let users choose one of several or know informations by showing bottomSheet, you can use YYBottomSheet. Simple And Clear 😎

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Usage

To create and show a bottomSheet, first of all, import the module at the beginning of the file:

import YYBottomSheet

First of all, you can show the bottomUpTable as below:

let bottomUpTable = YYBottomSheet.init(bottomUpTableTitle: title, dataArray: dataArray, options: nil) { cell in
    // whatever you want to code
    // print("\(cell.indexPath.row) : \(cell.titleLabel.text)")
}

bottomUpTable.show()

And button handler (SelectHandler) is just a lambda:

(YYBottomSheetCell) -> ()

Second, you can show the simpleToast as below:

let message = "Hello World!"
let simpleToast = YYBottomSheet.init(simpleToastMessage: message, options: nil)

simpleToast.show()

You can customize several things by setting options as below:

BottomUpTableOptions

option example
allowTouchOutsideToDismiss false
backgroundAlpha 0.3
tableViewHeight 200
tableRowHeight 50
tableViewCellLabelTextColor UIColor.blue
tableViewSeperatorStyle UITableViewCell.SeparatorStyle.none
tableViewBackgroundColor UIColor.white
headerViewBackgroundColor UIColor.yellow
headerViewTitleLabelTextColor UIColor.red

SimpleToastOptions

option example
showDuration 2.0
backgroundColor UIColor.black
beginningAlpha 0.8
messageFont UIFont.italicSystemFont(ofSize: 15)
messageColor UIColor.white

Check full example as below:

/**
* BottomUpTable
*/
let title = "Fruits"
let dataArray = ["apple", "grape", "watermelon", "banana", "strawberry", "cherry", "pineapple", "pear"]
let options: [YYBottomSheet.BottomUpTableOptions:Any] = [
    .allowTouchOutsideToDismiss: true,
    .backgroundAlpha: 0.5,
    .tableViewHeight: 200,
    .tableRowHeight: 50,
    .tableViewSeperatorStyle: UITableViewCell.SeparatorStyle.none
]

let bottomUpTable = YYBottomSheet.init(bottomUpTableTitle: title, dataArray: dataArray, options: options) { cell in
    self.selectedFruitLabel.text = cell.titleLabel.text
}

bottomUpTable.show()

/**
* SimpleToast
*/
let options: [YYBottomSheet.SimpleToastOptions:Any] = [
    .showDuration: 2.0,
    .backgroundColor: UIColor.black,
    .beginningAlpha: 0.8,
    .messageFont: UIFont.italicSystemFont(ofSize: 15),
    .messageColor: UIColor.white
]

let message = "SimpleToast can be customized!"
let simpleToast = YYBottomSheet.init(simpleToastMessage: message, options: options)

simpleToast.show()

Installation

YYBottomSheet is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'YYBottomSheet'

Author

DevYeom, [email protected]

License

YYBottomSheet is available under the MIT license. See the LICENSE file for more info.

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].