iOS:如何使文本仅在启动程序期间显示一段时间?
我想在程序启动期间放置一个文本标签,某种文本指令仅持续 5 秒然后消失。我可以知道如何在 iOS 中执行此操作吗?这是我的代码示例。
NSString *displayText = [[NSString alloc] initWithFormat: @"Please select your item.",
startup.text = displayText ;
I want to put a text label during the start up of a program, some sort of a text instruction for 5 second only and disappear. May I know how to do so in iOS ? Here is my code example.
NSString *displayText = [[NSString alloc] initWithFormat: @"Please select your item.",
startup.text = displayText ;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在以下语句之后,
启动一个将在一定持续时间后触发的
NSTimer
。在
hideLabel:
方法中,您可以隐藏它。After the following statement,
start a
NSTimer
that will fire after certain duration.In
hideLabel:
method, you hide that.