欢迎来到 MyAlert!
嗨!MyAlert 是一个 alertview。简单来说,显示应用程序中的通知。它简单易用且易于开发。
要求
- iOS 9.0+
- Xcode 9.0
- Swift 4
安装
CocoaPods
您可以使用 CocoaPods 通过将其添加到您的 Podfile
中来安装 myAlert
platform :ios, '9.0'
use_frameworks!
pod 'myAlert'
手动
- 下载并将
MyAlertController.swift
拖放到您的项目中。 - 恭喜!
用法
let myAlert = MyAlertController()
myAlert.yourView = self.view
myAlert.bgColor = UIColor.red
myAlert.textColor = UIColor.white
myAlert.show(title:"For example alert view and title",subtitle:"Here is the sub title",delay:3)
特性
基础知识
myAlert.show(title:"For example alert view and title",subtitle:"Here is the sub title")
延迟
可以设置通知关闭时间
myAlert.show(title:"For example alert view and title",subtitle:"Here is the sub title",delay:3)
图片
可以为alertView添加图片
myAlert.show(title:"For example alert view and title",subtitle:"Here is the sub title",mImage:UIImage(named:"info")!,delay:3)
关闭
myAlert.close()
自定义
public var bgColor
public var textColor
public var fontName:String
public var titleFontSize: CGFloat
public var subTitleFontSize: CGFloat
public var alertRadius:CGFloat
public var yourView: UIView?
发布历史
- 1.0首次提交