iOS常用小功能代码

2017-08-05  本文已影响15人  gong2012v1987

主要记录在项目中使用频率较高,同时拿来就能用的代码,算是mark一下

1、打电话

2、appStore应用评分

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

3、app间跳转

这个app的url地址就是:xingdtiOSApp://com.xingdt.iOSindentifier
可以有多个scheme,也就是说一个app可以有多少url地址,但是要保证唯一性,否则可能会有冲突

上一篇 下一篇

猜你喜欢

热点阅读