iTunes评论iOS 7而不将我的应用程序发送到后台

时间:2014-06-15 17:50:28

标签: objective-c ios7 itunes review

我知道要打开itunes的评级页面,我应该从我的应用程序打开url itms-apps://itunes.apple.com/app/idAPPID其中APPID是我的应用程序的ID。虽然此调用的结果将我的应用程序发送到后台并打开itunes。是否可以在不离开我的应用程序的情况下打开评级页面,例如在Web视图中? 提前致谢

1 个答案:

答案 0 :(得分:0)

SKStoreProductViewController* spvc = SKStoreProductViewController.new;
spvc.delegate = self; //self is the view controller to present spvc
[spvc loadProductWithParameters:@{SKStoreProductParameterITunesItemIdentifier:@(APPSTORE_ID)}
                completionBlock:^(BOOL result, NSError *error)
                {
                    if (result)
                        [(UIViewController*)spvc.delegate presentViewController:spvc animated:YES completion:nil];
                }
];


-(void)productViewControllerDidFinish:(SKStoreProductViewController*)viewController
{
    [(UIViewController*)viewController.delegate dismissViewControllerAnimated:YES completion:nil];
}