Toast Message¶
FUIToastMessage
¶
public class FUIToastMessage
FUIToastMessage
provides convenience class methods for showing an overlay toast-type message centered on screen.
Only one message can be visible at the same time and the FUIToastMessage
class makes sure that previous messages
are properly dismissed before the next is shown.
You use the show()
method to display messages. By default, the toast message is shown for one second but applications can
change that duration.
- Note: A toast message is meant to be used for short messages and is limited to one line of text by default. This can be changed by
applications by setting the
maxNumberOfLines
parameter to another value.
Usage¶
Show Fullscreen¶
FUIToastMessage.show(message: "This is a message")
Show Fullscreen with Custom Duration¶
FUIToastMessage.show(message: "This is a message", withDuration: 3)
Last update: April 14, 2021