Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Latest commit

 

History

History
65 lines (45 loc) · 1.66 KB

README.md

File metadata and controls

65 lines (45 loc) · 1.66 KB

YJMessage

A library that displays message in iOS app with Android Snackbar-like style.

Demo

demo.gif

Installation

Add the following line in your Podfile:

pod "YJMessage"

Usage

The usage is simple, similar to TSMessages.

// basic
[YJMessage showMessageInViewController:self
                                     title:@"Hi, there"
                                  duration:1.5f
                                      type:YJMessageTypeInfo];

// show message with completion callback
[YJMessage showMessageInViewController:self
                                    title:@"hi, there"
                                 duration:1.5f
                                     type:YJMessageTypeInfo
                                 callback:^() {
                                     NSLog(@"message showed");
                                 }];

// show message with a button
[YJMessage showMessageInViewController:self
                                     title:@"hey, error!"
                                  duration:1.5f
                                      type:YJMessageTypeInfo
                                  callback:nil
                               buttonTitle:@"tap me"
                            buttonCallback:^{
                                NSLog(@"Tapped.");
                            }];

YJMessageType

YJMessageTypeInfo

message_info.png

YJMessageTypeError

mesage_error.png

YJMessageTypeSuccess

message_sucess.png

YJMessageTypeWarning

message_warnning.png