Skip to content

An easy to use, native looking iOS / iPadOS toast notification view written in Swift for UIKit

License

Notifications You must be signed in to change notification settings

shadow-of-arman/Toasty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Toasty 🔥🍞🔥

Documentation Swift Version GitHub license

Preview

iOS system Toasty
iOS-system Toasty
iOS-system Toasty

Features

  • Easy to implement.
  • Highly customizable.
  • Dark Mode support. 🌓
  • 60FPS smooth animations.
  • Interactive expanded view support.
  • Top or bottom position support.
  • Icon support.
Icon support Customization Update transition
Icon Customization Update transition

Interaction example

expand

Instalation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate Toasty into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '11.0'
use_frameworks!

pod 'SideMenu', '~> 1.0'

Then, run the following command:

$ pod install

Carthage

Coming soon!

Swift Package Manager

Coming soon!

Manual

If you prefer not to use either of the aforementioned dependency managers, you can integrate sources in the Toasty folder into your project manually.

Usage

You can get started by creating an instance of toasty and preparing it before you want to use it. Just make sure to prepare the toast when your ViewController has entered a view hierarchy. (anything after viewDidAppear)

import Toasty

class ViewController: UIViewController {

    let toast = Toasty()
	

    override func viewDidLoad() {
        super.viewDidLoad()
        self.createUI()
    }

    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        self.toast.prepareToast(title: "Toasty!")
    }

}

Then all you need is to use the show function to show your toast!

self.toast.show(from: .top)
//or 
self.toast.show(from: .bottom)

By default your toast will hide/dismiss automatically, but you can also do it manually.

toast.show(from: .top, autoDismiss: false)
//then hide it by using
toast.hide()
//or
toast.dismiss()

hide() and dismiss() both do the exact same thing.

Costumization

There is a lot of code documentation in the project and you can use quick help to access these when ever you want.

For now you will have to use the in code documentation untill I update this README soon.

Documentation

You can find the docs here. Documentation is generated with jazzy and hosted on GitHub-Pages.

Community

Resources

License

Toasty is available under the MIT license, see the LICENSE file for more information.

About

An easy to use, native looking iOS / iPadOS toast notification view written in Swift for UIKit

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published