为iOS应用提供简单、可定制和柔和的Swift横幅通知。
AWBanner库提供了一个易于使用的类,可以在屏幕上显示横幅视图(您可以在任何位置指定Y坐标 origin)。横幅从Y坐标 origin(默认为0,但您可以更改它
👍
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)
}
推特 @aymenworks
许可证
CocoaPods是以下项目的产品: