第二次发布后制作UIAlertView节目 [英] Make a UIAlertView show after second launch

查看:67
本文介绍了第二次发布后制作UIAlertView节目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果那是不可能的,那么我应该怎么做呢,比如3分钟的app使用?这将用于Rate Us警报,但我宁愿用户有一些时间实际使用该应用程序,然后要求他们评分。

If that isn't possible, then how may I do it after, say, 3 minutes of app usage? This is going to be used for a Rate Us alert but I would rather the user have some time to actually use the app before it asks for them to rate.

推荐答案

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)options {
    // ...
    if ([self plusPlusLaunchCount] == 2) {
        [self showRateUsAlert];
    }
    return YES;
}

- (void)showRateUsAlert {
    // show the Rate Us alert view
}

- (NSInteger)plusPlusLaunchCount {
    static NSString *Key = @"launchCount";
    NSInteger count = 1 + [[NSUserDefaults standardUserDefaults] integerForKey:Key];
    [[NSUserDefaults standardUserDefaults] setInteger:count forKey:Key];
    return count;
}

这篇关于第二次发布后制作UIAlertView节目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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