zoukankan      html  css  js  c++  java
  • 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];

  • 相关阅读:
    win7下如何配置ODBC数据源
    串口小票打印机调试命令
    如何测试一个网页登陆界面
    Cookie是否是httponly
    XSS攻击 (安全方面)和传统防御技术
    Linux下查看文件和文件夹大小
    linux停止和查看启动服务的命令使用方法
    查看Linux下系统资源占用常用命令(top、free、uptime)
    三种经典iPhone上网络抓包方法详解
    如何用Fiddler对Android应用进行抓包
  • 原文地址:https://www.cnblogs.com/wq-gril/p/4874946.html
Copyright © 2011-2022 走看看