顶部定义:
#define IOS7 ([[UIDevice currentDevice].systemVersion intValue] >= 7 ? YES : NO)
方法
- (void)openAppaleShop
{
NSString *appleID = @"949346638";
if (IOS7) {
NSString *str = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/app/id%@",appleID];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
} else {
NSString *str = [NSString stringWithFormat:@"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@", appleID];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
}
}