程序猿阵线联盟-汇总各类技术干货

SJCActionSheet

2018-11-02  本文已影响0人  EI_Rey

类似于微博微信的ActionSheet,用法和系统的ActionSheet用法一样,采用Block,非常简单,可定义成都高

ActionSheet

WechatIMG357.jpeg WechatIMG358.jpeg

# Usage An example:

SJCActionSheet *sheet = [SJCActionSheet sjcSheetWithTitle:@"提示" message:@"去App Store评个分吧"];
    SJCAction *action1 = [SJCAction actionWithTitle:@"好的" style:SJCActionStyleDefault handler:^(SJCAction *action) {
        NSLog(@"点击了%@",action.title);
    }];
    SJCAction *action2 = [SJCAction actionWithTitle:@"等等" style:SJCActionStyleCancel handler:^(SJCAction *action) {
        NSLog(@"点击了%@",action.title);
    }];
    SJCAction *action3 = [SJCAction actionWithTitle:@"忽略" style:SJCActionStyleDestructive handler:^(SJCAction *action) {
        NSLog(@"点击了%@",action.title);
    }];
    [sheet showWithActions:@[action1, action2, action3]];
上一篇下一篇

猜你喜欢

热点阅读