1. 原始跳转方法
-(IBAction)popAppScore:(id)sender
{
NSString * urlStr = [NSString stringWithFormat:@"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=7436821"]; Id就是apple ID, 此链接方法可能被苹果弃用
NSURL *url = [NSURL URLWithString:urlStr];
[[UIApplication sharedApplication] openURL:url];
NSUserDefaults *scroreDefaults = [NSUserDefaults standardUserDefaults];
[scroreDefaults setValue:@"10" forKey:@"userAppScoreState"];
[scroreDefaults synchronize];
}
或者
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://itunes.apple.com/tw/app/id5101805"]]]; //好使
2. 当前app应用present界面方法
在ios6.0,APPle增加了一个心得功能,当用户需要给APP评分时候,不再跳转到appstore了,可以在应用内实现打开appstore,苹果提供了一个框架StoreKit.framework,实现步骤如下:
}
//取消按钮监听
-(void)productViewControllerDid
}