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

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

![ ![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)

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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容