zoukankan      html  css  js  c++  java
  • app 评分

    #pragma mark -- app store

    - (void)jumpToAppStore{

        

     

          NSString *evaluateString = [NSString stringWithFormat:@"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=517198355&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8" ];

        

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

     

        

    }

     

    #pragma mark -- 应用内

    //苹果提供了一个框架StoreKit.framework,

    //导入StoreKit.framework,在需要跳转的控制器里面添加头文件 #import,

    //实现代理方法:< SKStorePRoductViewControllerDelegate >

    - (void)loadAppStoreController

    {

        

        //初始化控制器

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

        //设置代理请求为当前控制器本身

        storeProductViewContorller.delegate = self;

        //加载一个新的视图展示

        [storeProductViewContorller loadProductWithParameters:

         //appId唯一的

         @{SKStoreProductParameterITunesItemIdentifier : @"517198355"} completionBlock:^(BOOL result, NSError *error) {

             //block回调

             if(error){

                 NSLog(@"error %@ with userInfo %@",error,[error userInfo]);

             }else{

                 //模态弹出appstore

                 [self presentViewController:storeProductViewContorller animated:YES completion:^{

                     

                 }

                  ];

             }

         }];

    }

         

    - (void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController{

                

                [self dismissViewControllerAnimated:YES completion:^{

                    

                }];

                

            }

     

  • 相关阅读:
    asp iis5.1x 2147467259 (0x80004005)
    asp 编辑 文本框为何会自动多出个逗号?
    asp 调用Recordset对象操作数据库
    windows2003 iis中播放flv格式的视频设置
    金额拆分 "万千百"..
    类似银行交易记录
    太扯了asp
    asp中通过Connection链接数据库
    给被Access过大问题困扰的网站,提供几种解决方案
    六款WEB上传组件性能测试与比较
  • 原文地址:https://www.cnblogs.com/daxueshan/p/6060883.html
Copyright © 2011-2022 走看看