ios 跳转appstore评论页面

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,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,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); background-color: transparent;">"<span style="margin: 0px; padding: 0px; line-height: normal; color: rgb(0,0); font-family: Helvetica,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,153); text-decoration: none; margin: 0px; padding: 0px; font-family: Helvetica,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>

相关文章

UITabBarController 是 iOS 中用于管理和显示选项卡界面的一...
UITableView的重用机制避免了频繁创建和销毁单元格的开销,使...
Objective-C中,类的实例变量(instance variables)和属性(...
从内存管理的角度来看,block可以作为方法的传入参数是因为b...
WKWebView 是 iOS 开发中用于显示网页内容的组件,它是在 iO...
OC中常用的多线程编程技术: 1. NSThread NSThread是Objecti...