Possible to show a “in App Store modal” in iOS 6?

前端 未结 1 1386
鱼传尺愫
鱼传尺愫 2021-02-01 10:10

Is it possible to show a modal view controller in iOS 6 that present my app in App Store?

相关标签:
1条回答
  • 2021-02-01 10:51

    Yes you can. (iOS6+)

    Take a look at SKStoreProductViewController

    NSDictionary *appParameters = [NSDictionary dictionaryWithObject:@"533886215"
                                                              forKey:SKStoreProductParameterITunesItemIdentifier];
    
    SKStoreProductViewController *productViewController = [[SKStoreProductViewController alloc] init];
    [productViewController setDelegate:self];
    [productViewController loadProductWithParameters:appParameters
                                     completionBlock:^(BOOL result, NSError *error)
    {
    
    }];
    [self presentViewController:productViewController
                       animated:YES
                     completion:^{
    
                     }];
    
    0 讨论(0)
提交回复
热议问题