仅在 iOS 中首次启动时显示屏幕 [英] Show screen on first launch only in iOS

查看:30
本文介绍了仅在 iOS 中首次启动时显示屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Tweetbot 和 Clear 在应用程序的第一次启动时显示一个小教程屏幕应用程序的工作原理.带有小教程的屏幕仅在应用程序第一次启动时弹出(1 次)

Tweetbot and Clear show's on the first start of the app a small tutorial screen how the app works. The screen with the small tutorial only pops up on the first start up of the app (1 time)

我如何以及用什么来制作类似的东西?谁能把我推向正确的方向?

How and with what can i make a similar thing? Can anyone push me in the right direction?

我的意思是:

推荐答案

在你的 viewDidLoad:

In your viewDidLoad:

if (![@"1" isEqualToString:[[NSUserDefaults standardUserDefaults]
                                objectForKey:@"aValue"]]) {
    [[NSUserDefaults standardUserDefaults] setValue:@"1" forKey:@"aValue"];
    [[NSUserDefaults standardUserDefaults] synchronize];

    //Action here

}

这篇关于仅在 iOS 中首次启动时显示屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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