• iOS 评论APP撰写评论


    ---- iOS 应用评分   

     

     UIAlertAction *alertAction1 = [UIAlertAction actionWithTitle:@"方式1 跳转到app商店" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {

            

            NSString *APPid = @"应用的ID";

            NSString *strloc = [NSString stringWithFormat: @"https://itunes.apple.com/us/app/qu-qi-wen-da/id%@?ls=1&mt=8",APPid];

            

            [[UIApplication sharedApplication] openURL:[NSURL URLWithString:strLoc]];

           

        }];

        

        UIAlertAction *alertAction2 = [UIAlertAction actionWithTitle:@"方式2 以模态跳转的方式应用内进行评分" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {

            SKStoreProductViewController *storeProductViewContorller = [[SKStoreProductViewController alloc] init];

            storeProductViewContorller.delegate = self;

            [storeProductViewContorller loadProductWithParameters: @{SKStoreProductParameterITunesItemIdentifier : @"应用的ID"} completionBlock:^(BOOL result, NSError *error) {

                

                if (result) {

                    [self presentViewController:storeProductViewContorller animated:YES completion:nil];

                }

            }];

        }];

        UIAlertAction *alertAction3 = [UIAlertAction actionWithTitle:@"残忍的拒绝" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {

            NSLog(@"残忍的拒绝");

        }];

        UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"”APP“评分" message:@"如果你觉得APP好用,可否为其评一个分数,评分过程只需花很少的时间,感谢您的支持!" preferredStyle:UIAlertControllerStyleActionSheet];

        

        [alertController addAction:alertAction1];

        [alertController addAction:alertAction2];

        [alertController addAction:alertAction3];

        [self presentViewController:alertController animated:YES completion:nil];

  • 相关阅读:
    复利软件单利及期望值的实现
    实验0 了解和熟悉操作系统
    关于《软件工程》的读后感
    评论
    一个完整的大作业
    数据结构化与保存
    爬取所有校园新闻
    用requests库和BeautifulSoup4库爬取新闻列表
    中文词频统计及词云制作
    组合数据类型练习,英文词频统计实例
  • 原文地址:https://www.cnblogs.com/wq-gril/p/4874946.html
Copyright © 2020-2023  润新知