iOS 两个app之间的跳转
来源:互联网 发布:php培训机构达内教育 编辑:程序博客网 时间:2024/03/29 21:05
朋友突然问到我这个问题,自己研究了会。简单的两个app之间的跳转。写了个demo给他了。下面是做的demo。
首先创建第一个叫jumpTest3的项目 在项目
- (void)viewDidLoad {
[superviewDidLoad];
//添加红色的按钮
UIButton *button = [UIButtonbuttonWithType:UIButtonTypeCustom];
button.backgroundColor = [UIColorredColor];
button.frame=CGRectMake(100,100,100,100);
[button addTarget:selfaction:@selector(clickJumeToAnotherApp)forControlEvents:UIControlEventTouchUpInside];
[self.viewaddSubview:button];
}
//点击红色按钮的时候去跳转
-(void)clickJumeToAnotherApp{
NSString *jumpString = [NSStringstringWithFormat:@"jumpTest3://hello"];
BOOL canOpen = [[UIApplicationsharedApplication]canOpenURL:[NSURLURLWithString:jumpString]];
NSLog(@"canOpen %d",canOpen);
if (canOpen) {
[[UIApplicationsharedApplication]openURL:[NSURLURLWithString:jumpString]];
}else{
UIAlertView *alertView =[[UIAlertViewalloc]initWithTitle:@"未安装"message:@"友情提示"delegate:selfcancelButtonTitle:@"确定"otherButtonTitles:nil,nil];
[alertView show];
}
}
本人菜鸟,以上都是自己的理解,有什么不对的地方,或者不合适的地方求大神指出来。谢谢大家了
- IOS两个App应用之间的跳转
- IOS两个App应用之间的跳转
- IOS中,两个APP之间的跳转!
- iOS 两个app之间的跳转
- iOS 两个app之间的跳转
- IOS---两个APP之间的跳转
- iOS两个App应用之间的跳转
- iOS两个App应用之间的跳转
- 两个app之间的跳转
- iOS两个app应用之间的互相跳转
- iOS中两个APP之间的跳转和通信
- iOS两个APP之间的跳转和传值
- iOS两个APP之间的数据传递和跳转
- iOS开发-两个APP之间跳转、传值
- iOS 两个APP之间互相跳转
- 两个APP之间跳转
- Android两个App之间跳转的方法
- app 之间跳转(iOS)
- 对象加强 分层思想加强 计算机表示方法
- 详解移动端的Touch事件
- UIScrollView的frame,contentSize,contentOffset,contentInset属性
- Lytro的教训:曾经的光场神器为何不行了?
- Netty是什么?
- iOS 两个app之间的跳转
- cocos2d-x 3.8.1 Widget 置灰的实现
- XCode工程中 Project 和 Targets区别
- 在对话框中显示bmp图片
- Spring3.x中各个jar包的作用总结
- 这些 iOS 面试基础题目,你都深入了解吗?
- JavaScript__JavaScript中的匿名函数及函数的闭包
- innerHTML
- 如何检测硬盘坏道