AWBanner 0.1.6

AWBanner 0.1.6

测试已测试
语言语言 SwiftSwift
许可证 MIT
发布最后发布2015年11月
SPM支持 SPM

Aymen Rebouh维护。



AWBanner 0.1.6

AWBanner

为iOS应用提供简单、可定制和柔和的Swift横幅通知。

AWBanner库提供了一个易于使用的类,可以在屏幕上显示横幅视图(您可以在任何位置指定Y坐标 origin)。横幅从Y坐标 origin(默认为0,但您可以更改它

👍)开始移动,直到您选择的持续时间结束(我一般选择2.5秒)。要在大致时间之前关闭横幅,用户可以点击它。要求

安装

guard ios >= 7 else { return }

手动

只需将AWBANNER.swift文件拖放到您的项目中。

使用方法

要显示横幅,请使用以下代码:

作者

AWBanner.showWithDuration(2.5,
delay: 0.0,
message: NSLocalizedString("🕒The reminder has been successfully scheduled.", comment: "Banner title that informs the user the notification has been successfully scheduled"),
backgroundColor: ThemeManager.currentTheme.mainColor,
textColor: UIColor.whiteColor())
}

// Or if you want to choose where it comes from, add the last parameter yOrigin, like :

AWBanner.showWithDuration(2.5,
delay: 0.0,
message: NSLocalizedString("🕒The reminder has been successfully scheduled.", comment: "Banner title that informs the user the notification has been successfully scheduled"),
backgroundColor: ThemeManager.currentTheme.mainColor,
textColor: UIColor.whiteColor(),
originY: 40.0)
}

Rebouh Aymen, [email protected]

推特 @aymenworks

许可证

AWBanner以MIT许可证可用。有关详细信息,请参阅LICENSE文件。

CocoaPods是以下项目的产品: