GRNAlertView 1.0.1

GRNAlertView 1.0.1

测试已测试
Lang语言 Obj-CObjective C
许可 MIT
发布了最新版本2016年6月

Guarana Technologies Inc. 维护。




这个库是由 www.guarana.io 创建的

这个库非常易于使用,允许您以很好的方式与用户交互,同时保留屏幕的审美。

安装

  • Cocoapods
pod 'GRNAlertView', '~> 1.0'

点击此处获取有关 Cocoapods 及如何安装的更多信息

  • 手工

将 GRNAlertView 文件夹拖拽到您的项目中。

如何使用

实例化您的 AlertContoller

注意:如果您只想要一个按钮,只需让 rightButtonTitle 字符串为空。

AlertController * alert = [[AlertController alloc] initWithTitle:@"My Title" subTitle:@"With a sub-title here" content:@"This is an alert view whith image Type some content here." leftButtonTitle:@"OK" rightButtonTitle:@"" andImage:[UIImage imageNamed:@"globe"]];

设置按钮动作

[alert setLeftButtonAction:^(AlertController * controller) {
    // Do something here

}];

[alert setRightButtonAction:^(AlertController *controller) {
    // Do something here

}];

如下显示警报

[alert showOn:self];

设置您想要的背景类型

alert.backgroundType = BackgroundTypeTransparentLight;
  • BackgroundTypeDefault(背景透明)

  • BackgroundTypeTransparentLight(背景为带透明度的白色)

Light

  • BackgroundTypeTransparentDark(背景为带透明度的黑色)

Dark

  • BackgroundTypeBlurred(背景模糊)

Blurred

自定义

//label text colors
titleColor
subtitleColor
contentColor

//button tint colors
leftButtonColor
rightButtonColor

//background of the alertview frame
alertBackgroundColor
//background of the buttons
leftButtonBackgroundColor
rightButtonBackgroundColor

//alertview radius
cornerRadius
//alertview shadow opacity
shadowOppacity
//alertview shadow spread
shadowSpread

即将推出

  • 更多转场效果
  • 更多动画
  • 动态按钮(垂直/水平)
  • 评分选项
  • Cocoapods