Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想发出一个会在 2 秒后响起的警报。如何处理报警代码。有什么帮助吗?
谢谢
您应该查看 NSTimer 类
这真的取决于你是什么意思alarm...
alarm
如果您想在一段时间后弹出警报,您可以使用本地通知,这是 iOS 4 的一项功能。一个例子可以在这里找到。
如果您需要计时器调用某些功能,请尝试NSTimer。这是一个例子。