标签:
app内评分
导入依赖的框架
#import <StoreKit/StoreKit.h>
// app内评分 - (void)presentStoreProductVC { SKStoreProductViewController *storeProductViewContorller = [[SKStoreProductViewController alloc] init]; storeProductViewContorller.delegate = self; [storeProductViewContorller loadProductWithParameters: @{SKStoreProductParameterITunesItemIdentifier:@"xxxxxxxxx"} completionBlock:^(BOOL result, NSError *error) { if(error){ NSLog(@"error %@ with userInfo %@",error,[error userInfo]); }else{ [self presentViewController:storeProductViewContorller animated:YES completion:nil]; } }]; } #pragma mark - SKStoreProductViewControllerDelegate - (void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController { [self dismissViewControllerAnimated:YES completion:nil]; }
标签:
原文地址:http://www.cnblogs.com/airy99/p/4506367.html