码迷,mamicode.com
首页 > 移动开发 > 详细

ios 跳转appstore评论页面

时间:2015-04-13 11:03:49      阅读:132      评论:0      收藏:0      [点我收藏+]

标签:uiapplication   ios   ios开发   appstore   ipad   

iOS7以前是这样的:

  1.  NSString  * nsStringToOpen = [NSString  stringWithFormat: @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@",nsAppId  ];  
  2.       
  3.     [[UIApplication sharedApplication] openURL:[NSURL URLWithString:nsStringToOpen]]; 
iOS8以后那样是没有反应的,只能这样才行


找到应用程序的描述链接,比如:http://itunes.apple.com/gb/app/yi-dong-cai-bian/id391945719?mt=8

<code style="margin: 0px; padding: 0px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"><span class="pun" style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent;">[[</span><span class="typ" style="margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(43, 145, 175); background-color: transparent;">UIApplication</span><span class="pln" style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent;"> sharedApplication</span><span class="pun" style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent;">]</span><span class="pln" style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent;"> openURL</span><span class="pun" style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent;">:[</span><span class="pln" style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent;">NSURL </span><span class="typ" style="margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(43, 145, 175); background-color: transparent;">URLWithString</span><span class="pun" style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent;">:@</span><span class="str" style="margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(128, 0, 0); background-color: transparent;">"<span style="margin: 0px; padding: 0px; line-height: normal; color: rgb(0, 0, 0); font-family: Helvetica, Arial, sans-serif; white-space: normal;">itms://</span><a target=_blank href="http://itunes.apple.com/gb/app/yi-dong-cai-bian/id391945719?mt=8" style="color: rgb(59, 89, 153); text-decoration: none; margin: 0px; padding: 0px; font-family: Helvetica, Arial, sans-serif; line-height: normal; white-space: normal;">itunes.apple.com/gb/app/yi-dong-cai-bian/id391945719?mt=8</a>"</span><span class="pun" style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent;">]];</span></code>

ios 跳转appstore评论页面

标签:uiapplication   ios   ios开发   appstore   ipad   

原文地址:http://blog.csdn.net/yangchen9931/article/details/45021745

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!