Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Crouton

Croutons provide lightweight feedback about an operation. They are the iOS equivalent of Android Snackbars. They show a brief message at the bottom of the screen. Croutons appear above all other elements on screen and only one can be displayed at a time. Croutons can also contain an action.

portfolio_view

Usage

To display a crouton, use the CroutonController class, this class orchestrates Crouton presentation and allows dimissing already presented or enqueued croutons.

The showCrouton method will show (or enqueue if a crouton is already being shown) the crouton.

Styles

Croutons come in two flavors. Info and Critical.

Info Critical
Info Info

Dismissal / Cancellation

When presenting a crouton via the showCrouton method, you are given a CroutonController.Token type you can use to later dismiss the crouton if needed.

Demo

Config

When configuring the Crouton you can select different intervals with some features:

Interval Close Action
5" NO NO
10" NO Mandatory
Infinite Mandatory NO
Infinite Optional YES