iOS 消息提示:JRToast

jopen 9年前發布 | 20K 次閱讀 JRToast iOS開發 移動開發

JRToast, 類似于安卓Toast的一種提示效果, 繼續操作不需要等待其消失。

JRToast

在需要使用JRToast的控制器中 #import "JRToast.h"

- (IBAction)defaultToast:(UIButton *)sender
{
    [JRToast showWithText:@"默認持續2秒,在屏幕中間"];
}

- (IBAction)durationToast:(UIButton *)sender
{
    [JRToast showWithText:@"持續3秒,在屏幕中間" duration:3.0f];
}

- (IBAction)topOffsetToast:(UIButton *)sender
{
    [JRToast showWithText:@"距離頂部50" topOffset:50.0f];
}

- (IBAction)topOffsetAndDuration:(UIButton *)sender
{
    [JRToast showWithText:@"距離頂部100,持續3秒" topOffset:100.0f duration:3.0f];
}

- (IBAction)bottomToast:(UIButton *)sender
{
    [JRToast showWithText:@"距離底部50" bottomOffset:50.0f];
}

- (IBAction)bottomAndDuration:(UIButton *)sender
{
    [JRToast showWithText:@"距離底部100,持續3秒" bottomOffset:100.0f duration:3.0f];
}

項目主頁:http://www.baiduhome.net/lib/view/home/1438956776161

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!