EKBlurAlert 2.0.0

EKBlurAlert 2.0.0

Emil Karimov 维护。



  • Emil Karimov

EK Blur Alert

Swift Version Cocoapods Build Status GitHub license GitHub release

为 iOS 应用中的轻量级操作创建 EK Blur Alert 视图,例如 iOS 音乐应用。

EK Blur Alert View 是一个框架,旨在重现 Apple 的私有 Modal 状态视图。在设计 iOS 应用时,我们可能希望通知用户任务的成功完成。当我们创建应用程序时,我们需要帮助用户了解特定操作的结果。此框架将帮助您制作与 Apple 音乐应用或播客应用中相同的提示。

Apple 的解决方案是在屏幕上显示一个自删除的小型 Modal 视图。

text

新闻应用、Apple Music 应用和播客应用中的用法,开发人员已经希望访问这个视图一段时间了。这就是这个框架解决的问题。

安装

Swift 包管理器

    .package(url: "https://github.com/emvakar/EKBlurAlert.git", from: "2.0.0")

CocoaPods

source 'https://github.com/emvakar/EKBlurAlert.git'

pod 'EKBlurAlert'

手动

简单地导入框架,并添加以下代码以开始使用。

如何使用

使用测试参数进行简单空配置

import EKBlurAlert

let alertView = EKBlurAlertView(frame: view.bounds)
view.addSubview(alertView)

或使用以下参数完全自定义EKBlurAlertView

import EKBlurAlert

func presentBluredAlertView() {
    let alertView = EKBlurAlertView(frame: view.bounds,
                                    titleFont: UIFont.systemFont(ofSize: 17),
                                    subTitleFont: UIFont.systemFont(ofSize: 17),
                                    image: UIImage(),
                                    title: "my Title",
                                    subTitle: "My subtitle",
                                    autoFade: true,
                                    after: 0.6,
                                    radius: 15,
                                    blurEffect: .dark)
    view.addSubview(alertView)
}

功能

动画

EKBlurAlertView将以快速淡入和缩放效果出现和消失,以符合Apple的实现。

计时器

EKBlurAlertView将在几秒钟内出现,以免干扰您应用的UX。

样式

EKBlurAlertView旨在与Apple的实现样式和美学相匹配。

这包括略带圆角的边角,背景是模糊的视觉效果视图,除了图像外,还有标题和副标题选项,并且在视图中居中。动画旨在与Apple的原始设计相匹配。