1. DGSnackBar
  2. Requirements
  3. Installation
  4. Usage
  5. Properties

DGSnackBar

SnackBar that responds to the keyboard and shows a message at the bottom of the screen.


Requirements

  • iOS 13.0+
  • Swift 5.0+
  • Xcode 10.0+

Installation

SPM

File > Add Packages > https://github.com/donggyushin/DGSnackBar/edit/main/README.md

CocoaPod

pod 'DGSnackBar', :git => 'https://github.com/donggyushin/DGSnackBar'

Usage

DGSnackBar.shared.showToast("Hi")

Properties

Properties Description Default Type
backgroundColor Snackbar’s background color .systemBackground UIColor
textColor Snackbar’s text color .label UIColor
duration Snackbar’s visual duration time 2.5 CGFloat
textAlignment Snackbar’s text alignement .natural NSTextAlignment
alpha Snackbar’s alpha 0.8 CGFloat
cornerRadius Snackbar’s border radius 10 CGFloat

GitHub

View Github