TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Nov 2016 |
Maintained by ChenBW.
这个 alertSheet模仿微信的样式,尺寸,文字大小,布局都是跟微信一样的;可以自定义title/message/button/取消按钮等颜色
哦.但是文字的大小,布局不可以改变
,感觉微信的布局真心不错呢!"
- (void)customAlertSheet{
CBWAlertSheet *sheet = [[CBWAlertSheet alloc]init];
sheet.type = CBWAlertSheetTypeCancelButton;
sheet.title = @"标题😄";
sheet.message = @"这个 alertSheet模仿微信的样式,尺寸,文字大小,布局都是跟微信一样的;可以自定义title/message/button/取消按钮等颜色哦.但是文字的大小,布局不可以改变,感觉微信的布局真心不错呢!";
sheet.titleTextColor = [UIColor redColor];
sheet.messageTextColor = [UIColor greenColor];
sheet.cancleButtonColor = [UIColor redColor];
sheet.cancleButtonTextColor = [UIColor yellowColor];
[sheet addSheetWithTitle:@"好的,去点个赞!" color:nil handler:nil];
[sheet addSheetWithTitle:@"去意已决" color:nil handler:nil];
[sheet show];
}
- (void)customAlertSheetNoTitleType{
//关闭或者修改手势密码
CBWAlertSheet *sheet = [[CBWAlertSheet alloc]init];
sheet.type = CBWAlertSheetTypeCancelButton;
sheet.titleTextColor = [UIColor redColor];
sheet.messageTextColor = [UIColor greenColor];
sheet.cancleButtonColor = [UIColor redColor];
sheet.cancleButtonTextColor = [UIColor yellowColor];
[sheet addSheetWithTitle:@"胖子,快去减肥啦!" color:[UIColor blackColor] handler:nil];
[sheet addSheetWithTitle:@"黑子,你又变胖啦!" color:[UIColor blackColor] handler:nil];
[sheet show];
}
- (void)customAlertSheetNoCancelType{
CBWAlertSheet *sheet = [[CBWAlertSheet alloc]init];
sheet.titleTextColor = [UIColor redColor];
sheet.messageTextColor = [UIColor greenColor];
sheet.cancleButtonColor = [UIColor redColor];
sheet.cancleButtonTextColor = [UIColor yellowColor];
[sheet addSheetWithTitle:@"羊小年" color:[UIColor blackColor] handler:nil];
[sheet addSheetWithTitle:@"陈小黑" color:[UIColor blackColor] handler:nil];
[sheet addSheetWithTitle:@"The next..." color:[UIColor blackColor] handler:nil];
[sheet show];
}
使用方法:
1. 直接拖'CBWAlertSheet'的. h 和 .m 文件
2.使用 pod 'CBWAlertSheet'
如果喜欢帮我 start 一下哦!