KDNotification 是一个轻量级框架,用于显示和与应用程序中的通知和toast进行交互。通用样式灵感来源于 iOS 10 的通知。
通知 | Toast |
---|---|
![]() |
![]() |
![]() |
![]() |
[KDNotification showWithText:@"PING" duration:3.0 tapped:^ {
NSLog(@"tapped notification");
}];
[KDToastNotification showWithText:@"this is a toast. Who has the butter?" duration:3.0 tapped:^ {
NSLog(@"tapped toast");
}];
[KDNotification setNotificionStyle:UIBlurEffectStyleDark];
要运行示例项目,请克隆仓库,然后从示例目录运行 pod install
。
KDNotification 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile
pod "KDNotification"
Kéké Dandois Twitter: @kekedandois
KDNotification 在 MIT 许可下提供。有关更多信息,请参阅 LICENSE 文件。