Swiftpack.co - donggyushin/DGSnackBar as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by donggyushin.
donggyushin/DGSnackBar v1.0.5
Functional SnackBar that responds to the keyboard and shows a message at the bottom of the screen.
⭐️ 11
🕓 28 weeks ago
iOS
.package(url: "https://github.com/donggyushin/DGSnackBar.git", from: "v1.0.5")
  1. DGSnackBar
  2. Requirements
  3. Installation
  4. Usage
  5. Properties

DGSnackBar

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

Requirements

  • iOS 12.0+
  • Swift 5.5+
  • Xcode 10.0+

Installation

SPM

File > Add Packages > https://github.com/donggyushin/DGSnackBar

CocoaPod

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

Usage

DGSnackBar.shared.showToast("Hi") {
    print("Add here a function that you want to execute when user tapped the snackbar view")
}

// If you want to show SnackBar with title message
DGSnackBar.shared.showToast("Description text", "Title text")

Properties

Properties Description Default Type
backgroundColor Snackbar's background color .black UIColor
textColor Snackbar's text color .white UIColor
duration Snackbar's visual duration time 2.5 CGFloat
textAlignment Snackbar's description text alignement .natural NSTextAlignment
titleTextAlignment Snackbar's title text alignment .natural NSTextAlignment
alpha Snackbar's alpha 0.8 CGFloat
cornerRadius Snackbar's border radius 10 CGFloat

GitHub

link
Stars: 11
Last commit: 27 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

v1.0.5
28 weeks ago

What's Changed

Full Changelog: https://github.com/donggyushin/DGSnackBar/compare/v1.0.4...v1.0.5

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics