ToastAlerts 3.0.0

ToastAlerts 3.0.0

Eduardo Irias维护。



  • 作者:
  • Eduardo Irías

Toast Alert View

Swift Package Manager compatible Carthage compatible

Build Status

codebeat badge

一个用于在iOS中显示Toast Alerts的框架。

更多信息

功能

  • 带有消息和图像的Toast视图
  • 带有时效关闭的Toast视图
  • 可点击关闭的Toast视图
  • 自定义Toast视图

安装

Swift包管理器

通过Swift包管理器将其添加到现有iOS项目中

Carthage

将以下行添加到您的Cartfile中

github "estampworld/ios-toast-alerts"

运行 carthage update

Cocoapods

将Pod添加到您的Podfile中

pod 'toastalerts'

然后运行

pod install

用法

Swift

Toast Alert View with Message & Image

使用ToastAlertView对象显示带有消息和图标的Toast Alert

let toastAlertView =  ToastAlertView(message: "Hey!", image: UIImage(named: "Cat Icon")!)
toastAlertView.show()

Toast Alert View with Time Dissmis Only

//Toast Alert View with Time Dissmis Only
let toastAlertView = ToastAlertView(message: "4 Seconds", image: UIImage(systemName: "flame")!, hideWithType: .time(time: 4))
toastAlertView.show()

自定义Toast Alert View显示

//Custom EW Toast Alert View
let toastAlertView = ToastAlertView()
toastAlertView.message = "Example"
toastAlertView.image = UIImage(named: "img1")!
toastAlertView.show()
//toastAlertView.dismiss() to Hide

示例

Example

维护者

Eduardo Irias,创建者。

贡献

  1. 将其分叉( https://github.com/[my-github-username]/ios-toast-alerts/fork
  2. 创建你的功能分支(git checkout -b feature/[my-new-feature])
  3. 提交您的更改(git commit -am '添加一些功能')
  4. 推送到分支(git push origin feature/[my-new-feature])
  5. 创建一个新的拉取请求

许可

Toast Alert Views 可在 MIT 许可下使用。有关更多信息,请参阅 LICENSE 文件。