SKStoreProductViewController使用

 
    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使用)