=====工程A=====
0.
1.Add
2.
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
- (
BOOL
)application:(UIApplication*)application handleOpenURL:(
NSURL
*)url
{
//处理传递过来的参数
UIAlertView*alertView;
NSString
*text= [[url host]stringByReplacingPercent
NSUTF8StringEncoding
];
alertView= [[UIAlertView alloc] initWithTitle:@
"Text"
message:text
delegate:
nil
cancelButtonTitle:@
"OK"
otherButtonTitles:
nil
];
[alertViewshow];
[alertViewrelease];
return
YES
;
}
|
====工程B=====
3.
|
1
|
|
4.
B启动->A启动->A弹出Alert:
另外:
0.
1.
2.
3.
本文详细介绍了如何在iOS应用间通过URL Scheme进行数据传递,包括创建URL Scheme、在AppDelegate中处理URL和调用另一个应用的方法,并讨论了URL Scheme的构成规则和注意事项。
1万+

被折叠的 条评论
为什么被折叠?



