一行代码实现提示,也可根据自己的需求自定义
githud:https://github.com/kzq5/XXAlertView
一行代码实现提示,也可根据自己的需求自定义
[XXAlertView showAlert:title inView:self.view withConfig:[XXAlertViewConfig defaultConfig]];
自定义实现
// 自定义配置
XXAlertViewConfig *config = [XXAlertViewConfig defaultConfig];
// 通知样式
// 自定义背景颜色
config.backgroundColor = [UIColor colorWithRed:234/255.0 green:234/255.0 blue:234/255.0 alpha:1.0];
// 自定义字体大小
config.textSize = 16.f;
// 自定义文字颜色
config.textColor = [UIColor colorWithRed:255/255.0 green:75/255.0 blue:113/255.0 alpha:1.0];
// 自定义行间距
config.textLineSpace = 4.f;
// 自定义悬停时间
config.duration = 2.f;
//自定义提示类型,是成功,提示,失败等
config.alertType = type;
//显示
[XXAlertView showAlert:title inView:[UIApplication sharedApplication].keyWindow withConfig:[XXAlertViewConfig defaultConfig]];
下载地址:http://www.wenjiangs.com/wp-content/uploads/2021/docimg35/fdbcd9e722e0c9f777c42cfdaaf41f47.zip
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论