美文网首页
APP引导去App Store评价去吐槽等系列操作

APP引导去App Store评价去吐槽等系列操作

作者: ChangeWorld | 来源:发表于2017-08-14 18:30 被阅读127次
    弹出这个时机很重要,毕竟客户也是相当厌烦弹窗和通知这类东西动不动就弹一个选择题,妨碍其他操作,很不友好,但是有些功能需要在适当的时机弹出来告知用户一些私人定制的信息和操作...

    譬如:

        ///MARK: -引导添加App Store的评论
    - (void)guideAppstoreComment{
        NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
        BOOL isNotGuide = [[defaults objectForKey:@"isNotGuideAppstore"] boolValue];
        if (isNotGuide) {
            return ;
        }
            //跳转到评价页面
        UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"评价一下" message:@"我们拼了命加班,只希望那个您能用的爽。给个五星好评吧亲!" preferredStyle:UIAlertControllerStyleAlert];
        UIAlertAction *action1 = [UIAlertAction actionWithTitle:@"五星好评" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
            NSString *str = [NSString stringWithFormat: @"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&id=%@",KJJYSAPPID];
            [[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
        }];
        UIAlertAction *action2 =[UIAlertAction actionWithTitle:@"稍后评价" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
        }];
        UIAlertAction *action3 =[UIAlertAction actionWithTitle:@"不再提示" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
            [defaults setObject:@"YES" forKey:@"isNotGuideAppstore"];
            [defaults synchronize];
        }];
    
        [alertVC addAction: action1];
        [alertVC addAction: action2];
        [alertVC addAction: action3];
    
        [self presentViewController: alertVC animated:YES completion:^{
    
        }];
    }
    
    

    相关文章

      网友评论

          本文标题:APP引导去App Store评价去吐槽等系列操作

          本文链接:https://www.haomeiwen.com/subject/jyxprxtx.html