适用于iOS的Growl / toast风格通知库 [英] Growl/toast style notifications library for iOS

查看:248
本文介绍了适用于iOS的Growl / toast风格通知库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以推荐一个库来在iOS上实现咆哮或吐司式通知吗?例如,在用户保存个人资料后,我希望通知淡入,逗留3秒,报告个人资料已保存并淡出。现在我有一个UIAlertView,用一个OK按钮中断用户的工作流程,我觉得这样就太过分了。

Can anyone recommend a library for implementing growl or toast-style notifications on iOS? For example, after a user saves a profile, I want to have a notification fade in, linger for 3 seconds, report "profile saved", and fade out. Right now I have a UIAlertView that interrupts the user's workflow with a single "OK" button, and I feel like that is overkill.

Android Toast类是我在iOS上寻找的一个例子。

The Android Toast class is an example of what I am looking for on iOS.

谢谢!

推荐答案

我创建了一个我认为你的解决方案会发现有用的:
https://github.com/scalessec/toast

I created a solution that I think you'll find useful: https://github.com/scalessec/toast

它被写为obj-c类,实质上是将makeToast方法添加到任何UIView实例中。例如:

It's written as a obj-c category, essentially adding makeToast methods to any instance of UIView. eg:

[self.view makeToast:@"Profile saved"
            duration:2.0
            position:@"bottom"];

这篇关于适用于iOS的Growl / toast风格通知库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆