iOS常用的一些小功能之應用間跳轉, 應用評分

來源:互聯網
上載者:User

標籤:style   blog   http   io   os   使用   ar   for   sp   

應用間跳轉

有時候,需要在本應用中開啟其他應用,比如從A應用中跳轉到B應用

首先,B應用得有自己的URL地址(在Info.plist中配置)

B應用的URL地址就是:lwb://weibin__li.cn
接著在A應用中使用UIApplication完成跳轉
NSURL *url = [NSURL URLWithString:@"lwb://weibin__li.cn"];

[[UIApplication sharedApplication] openURL:url];


應用評分

為了提高應用的使用者體驗,經常需要邀請使用者對應用進行評分
應用評分無非就是跳轉到AppStore展示自己的應用,然後由使用者自己撰寫評論
如何跳轉到AppStore,並且展示自己的應用
方法1
NSString *appid = @"444934666";
NSString *str = [NSString stringWithFormat:
                 @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@", appid];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];


方法2
NSString *str = [NSString stringWithFormat:
                 @"itms-apps://itunes.apple.com/cn/app/id%@?mt=8", appid];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];


iOS常用的一些小功能之應用間跳轉, 應用評分

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.