JCAlertView 1.1.5

JCAlertView 1.1.5

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布上次发布Dec 2015

Hjaycee 维护。



  • 作者:Hjaycee

最简单的弹窗 !

默认 AlertView

(logo)

自定义 AlertView

(logo)

GIF

(logo)

介绍

  • 1.最简单的 UIAlertView 替代品。您只需写一行代码即可使用它。
  • 2.不必担心消息长度过长。有一个 UITextView 会自动显示长消息,并支持换行。
  • 3.支持队列管理 alertViews。
  • 4.漂亮的模糊背景。
  • 5.块代码。
  • 6.支持 iOS 6 及以上。
  • 7.请在使用前添加 Accelerate.framework。

如何使用?

将 JCAlertView 的 Pod 配置添加到您的 Podfile 中 pod 'JCAlertView'

2.手动

复制 JCAlertView 文件夹到您的项目
Accelerate.framework 添加到您的项目

之后,请查看以下代码或直接下载示例。

1.显示带 1 个按钮的 JCAlertView

[JCAlertView showOneButtonWithTitle:@"title" Message:@"message" ButtonType:JCAlertViewButtonTypeDefault ButtonTitle:@"button" Click:^{
    NSLog(@"click0");
}];

2.显示带 2 个按钮的 JCAlertView

[JCAlertView showTwoButtonsWithTitle:@"title" Message:@"message" ButtonType:JCAlertViewButtonTypeCancel ButtonTitle:@"button0" Click:^{
    NSLog(@"click0");
} ButtonType:JCAlertViewButtonTypeDefault ButtonTitle:@"button1" Click:^{
     NSLog(@"click1");
}];

3.显示带多个按钮的 JCAlertView

[JCAlertView showMultipleButtonsWithTitle:@"title" Message:@"message" Click:^(NSInteger index) {
    NSLog(@"click%zi", index);
} Buttons:@{@(JCAlertViewButtonTypeDefault):@"index = 0"},@{@(JCAlertViewButtonTypeCancel):@"index = 1"},@{@(JCAlertViewButtonTypeWarn):@"index = 2"}, nil];

4. 带自定义视图的 JCAlertView

UIView *customView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 150)];
JCAlertView *customAlert = [[JCAlertView alloc] initWithCustomView:customView dismissWhenTouchedBackground:YES];
[customAlert show];

联系我

E-mail : [email protected]

博客: http://blog.csdn.net/hjaycee

如果您有任何问题或建议,请随时联系我。谢谢!