예제 #1
0
        /**
         * Show a single message like a Toast.
         *
         * - parameter message:  Message text.
         * - parameter duration: Duration type.
         *
         * - returns: Void
         */
        public TTGSnackbar(string message, TTGSnackbarDuration duration) : base(CoreGraphics.CGRect.FromLTRB(0, 0, 320, 44))
        {
            this.Duration = duration;
            this.Message  = message;

            configure();
        }
예제 #2
0
        /**
         * Show a message with action button.
         *
         * - parameter message:     Message text.
         * - parameter duration:    Duration type.
         * - parameter actionText:  Action button title.
         * - parameter actionBlock: Action callback closure.
         *
         * - returns: Void
         */
        public TTGSnackbar(string message, TTGSnackbarDuration duration, string actionText, Action <TTGSnackbar> ttgAction) : base(CoreGraphics.CGRect.FromLTRB(0, 0, 320, 44))
        {
            this.Duration    = duration;
            this.Message     = message;
            this.ActionText  = actionText;
            this.ActionBlock = ttgAction;

            configure();
        }