SKStoreProductViewController使用
作者:
爱豆一颗心 | 来源:发表于
2020-11-20 18:55 被阅读0次
SKStoreProductViewController *skStoreProductViewController = [[SKStoreProductViewController alloc] init];
[skStoreProductViewController setDelegate:self];
[skStoreProductViewController loadProductWithParameters:@{SKStoreProductParameterITunesItemIdentifier : @"1173412177"}
completionBlock:^(BOOL result, NSError *error) {
if (error) {
NSLog(@"Error %@ with User Info %@.", error, [error userInfo]);
} else {
// Present Store Product View Controller
[self presentViewController:skStoreProductViewController animated:YES completion:^{
for(int i =0; i < skStoreProductViewController.view.subviews.count; i++) {
UIView *subView = skStoreProductViewController.view.subviews[i];
subView.frame = CGRectMake(0, 100, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height);
}
}];
}
}];
本文标题:SKStoreProductViewController使用
本文链接:https://www.haomeiwen.com/subject/vbnebktx.html
网友评论