YJMessage 0.0.7

YJMessage 0.0.7

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布最后发布2016年4月

Tinydust 维护。




YJMessage 0.0.7

  • Octree

一个在 iOS 应用中显示消息的库,类似于 Android Snackbar 风格。

演示

demo.gif

安装

在您的 Podfile 中添加以下行

pod "YJMessage"

用法

用法简单,类似于 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