Skip to content

Provides common API to create toast notifications for android and iOS

Notifications You must be signed in to change notification settings

mdanishs/nativescript-toasts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nativescript-toasts

This plugin provides a common API for android and iOS to show toast notifications in your NativeScript applications.

Installation

tns plugin add nativescript-toasts

How to use

var nstoasts = require("nativescript-toasts");
var options = {
	text: "Hello World",
    duration : nstoasts.DURATION.SHORT,
    position : nstoasts.POSITION.TOP //optional
}
nstoasts.show(options);

This plugin uses third party libraries for iOS

The plugin uses a pod created by Charles Scalesse to display toasts on iOS

https://cocoapods.org/pods/Toast

Typescript users

import * as Toast from 'nativescript-toasts';

let toastOptions:Toast.ToastOptions = {
    text: "Hello World", 
    duration: Toast.DURATION.SHORT,
    position: Toast.POSITION.TOP //optional property
};
Toast.show(toastOptions);

About

Provides common API to create toast notifications for android and iOS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •