App之间的跳转
成都创新互联专注于新宾企业网站建设,响应式网站建设,商城网站制作。新宾网站建设公司,为新宾等地区提供建站服务。全流程定制设计,专业设计,全程项目跟踪,成都创新互联专业和态度为您提供的服务
1,添加URL Types项
a,打开项目中.xcodeproj下的info目录,增加一项URL Typs
2,配置URL Scheme
a,将URL identifie选项为com.KeYi.lsf
b,将URL Scheme选项的内容修改为lsf
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation{//抓取url if (!url) { return NO; }else { if ([[url host] isEqualToString:@"expert"]) { NSArray *codeArr = [[url query] componentsSeparatedByString:@"="]; if (codeArr.count >0) { if (self.window.rootViewController) { BaseTabBarController *tabBarController = (BaseTabBarController*)self.window.rootViewController; BaseNavigationController * bnc = (BaseNavigationController*)tabBarController.selectedViewController; HomeDetailController * hdc = [[HomeDetailController alloc]init]; hdc.expertInfoDic = @{@"expertUserId":codeArr[1]}; [bnc pushViewController:hdc animated:YES]; }else { } } return YES; }else if ([[url host] isEqualToString:@"topic"]) { NSArray *codeArray = [[url query] componentsSeparatedByString:@"&"]; NSArray *codeArr = [codeArray[0] componentsSeparatedByString:@"="]; NSArray *otherArr = [codeArray[1] componentsSeparatedByString:@"="]; if (codeArr.count > 0) { if (self.window.rootViewController) { BaseTabBarController *tabBarController = (BaseTabBarController*)self.window.rootViewController; BaseNavigationController * bnc = (BaseNavigationController*)tabBarController.selectedViewController; ExpertDetailController * edc = [[ExpertDetailController alloc]init]; edc.topicInfo = @{@"topicId":codeArr[1],@"expertUserId":otherArr[1]}; [bnc pushViewController:edc animated:YES]; }else { } } return YES; } }...}
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流
现在虽然是移动互联网时代,但企业网站依然重要,包含PC站点,移动站。可以说企业网站关系企业的未来发展和前途,尤其对中小企业更是如此,一些中小企业老板,对自己的名片很在乎,因为这是个门面。...
用我们的专业和诚信赢得您的信赖,从PC到移动互联网均有您想要的服务!
如遇占线或暂未接听请拨:136xxx98888