MXActionSheet 是一個從底部上來的帶動畫彈窗控制元件,仿微信裡操作一樣!

穿山甲到底說了什麼發表於2018-12-19

程式碼demo已在Github開源, MXActionSheet, 如果幫助到您,點個星star哈!

MXActionSheet 是一個從底部上來的彈窗控制元件,仿微信裡操作一樣!

螢幕截圖

一個底部標題 兩個底部標題 刪除底部標題 超過兩個底部標題
一個底部標題.gif
兩個底部標題.gif
刪除底部標題.gif
超過兩個底部標題.gif

如何使用

一個底部標題

[MXActionSheet showWithTitle:@"MXActionSheet Supporting bellow Styles" cancelButtonTitle:@"cancel" destructiveButtonTitle:nil otherButtonTitles:@[@"title 1st"] selectedBlock:^(NSInteger index) {
        NSLog(@"------> index: %ld", index);
    }];
複製程式碼

兩個底部標題

[MXActionSheet showWithTitle:@"MXActionSheet Supporting bellow Styles" cancelButtonTitle:@"cancel" destructiveButtonTitle:nil otherButtonTitles:@[@"title 1st", @"title 2nd"] selectedBlock:^(NSInteger index) {
        NSLog(@"------> index: %ld", index);
    }];
複製程式碼

刪除底部標題

[MXActionSheet showWithTitle:@"MXActionSheet Supporting bellow Styles" cancelButtonTitle:@"cancel" destructiveButtonTitle:@"destructive titles" otherButtonTitles:@[@"title 1st", @"title 2nd"] selectedBlock:^(NSInteger index) {
        NSLog(@"------> index: %ld", index);
    }];
複製程式碼

超過兩個底部標題

[MXActionSheet showWithTitle:@"MXActionSheet Supporting bellow Styles" cancelButtonTitle:@"cancel" destructiveButtonTitle:nil otherButtonTitles:@[@"title 1st", @"title 2nd", @"title 3th"] selectedBlock:^(NSInteger index) {
        NSLog(@"------> index: %ld", index);
    }];
複製程式碼

相關文章