ATToast

public class ATToast: NSObject

The ATToast creates a self dismissing pop-up that can be used to display message to the user.

  • The variable allows to get a singleton instance of the class.

    Usage Example

    ATToast.sharedInstance
    

    Declaration

    Swift

    public static let sharedInstance :ATToast = ATToast()
  • The function allows to show the toast.

    Usage Example

    ATToast.sharedInstance.show(message: "This is how default toast looks like.")
    
    ATToast.sharedInstance.show(message: "Request submitted successfully..", type: ATToastType.success, displayDuration: 3.0)
    

    Declaration

    Swift

    public func show(message pMessage :String, type pType :ATToastType = ATToastType.information, displayDuration pDisplayDuration :TimeInterval = ATToast.toastDisplayDurationMedium)

    Parameters

    pMessage

    Message that is to be displayed.

    pType

    Type of the toast as defined with ATToastType.

    pDisplayDuration

    Duration for which the toast is to be displayed.