防微信alertSheet弹框(别问我为什么不用系统的)

产品提出的需求有时候是很扯淡的,这个按钮的字体,颜色。。。我去,所以系统的部分控件可以改变字体大小、颜色吗?(搜了一下alertSheet还是可以的,不过我没亲测,http://www.cnblogs.com/destiLaugh/p/5973218.html)

防微信alertSheet弹框(别问我为什么不用系统的)_第1张图片
![ ![01.png](http://upload-images.jianshu.io/upload_images/1776659-44fb574f6c5d1727.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)](http://upload-images.jianshu.io/upload_images/1776659-92f7fa4b0da0ecce.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

防微信alertSheet弹框(别问我为什么不用系统的)_第2张图片
05.png

使用方法 资源文件在JasonAcitonSheetViewUtil文件夹内,导入头文件 #import "XXYActionSheetView.h" 1.若使用代理方式 导入代理 XXYActionSheetViewDelegate

XXYActionSheetView *alertSheetView = [[XXYActionSheetView alloc] initWithTitle:@"您确定要删除此消息" delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:@"确定" otherButtonTitles:nil]; //弹出视图 [alertSheetView xxy_show];

调用代理方法

pragma mark - XXYActionSheetViewDelegate

(void)actionSheet:(XXYActionSheetView *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex{ NSLog(@"delegate点击的是:%zd", buttonIndex); if (0 == buttonIndex) {//

} }

2.使用block方式

XXYActionSheetView *alertSheetView = [[XXYActionSheetView alloc] initWithTitle:nil cancelButtonTitle:@"取消" destructiveButtonTitle:nil otherButtonTitles:@[@"打开相册", @"相机", @"微信支付", @"支付宝支付"] actionSheetBlock:^(NSInteger index) { NSLog(@"block点击的是:%zd", index); if (0 == index) {

    }
}];

//弹出视图 [alertSheetView xxy_show];

demo下载地址: ( 如果你需要的话) https://github.com/JasonDraem/JasonActionSheetView.git

或者cocoachina搜索 JasonActionSheetView

你可能感兴趣的:(防微信alertSheet弹框(别问我为什么不用系统的))