// App内部打开AppStore 应用页面
SKStoreProductViewController*storeProductVC = [[SKStoreProductViewController alloc] init];
//storeProductVC.delegate=self;
NSDictionary*dict = [NSDictionary dictionaryWithObject:@"1212685856" forKey:SKStoreProductParameterITunesItemIdentifier];
[storeProductVC loadProductWithParameters:dict completionBlock:^(BOOL result,NSError*error) {
if(result) {
[self presentViewController:storeProductVC animated:YES completion:nil];
}
}];
delegate
// 点击取消后
- (void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController
{
[viewController dismissViewControllerAnimated:YES completion:nil];
}
网友评论