//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]];

}

 

posted on 2014-08-13 22:01  ZiCheng  阅读(224)  评论(0编辑  收藏  举报