首页 > 技术文章 > 跳转 App Store 评分 IOS7及其他系统版本

iflewless 2014-08-13 22:01 原文

//iOS7和其他系统版本跳转链接不一样

- (void)clickUrl:(id)sender

{

    UIButton *bt = (UIButton *)sender;

    

    NSString *str = @"";

    

    if( ([[[UIDevice currentDevice] systemVersion] doubleValue]>=7.0))

    {

        str = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/app/id%d",bt.tag];

        

    }else

    {

        str = [NSString stringWithFormat:

                         @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%d",

                         bt.tag ];

    }


    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];

}

 

推荐阅读