标签:
1.首先设置第一个应用的的 URL:
2.然后设置第二个应用的的 URL:
AppJumpSecond:”,拼接//%@就可以实现传值
)[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString]];
4.处理传过去的数据
在上面传了textField的数据,接收时在AppDelegate的
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation方法里。
在AppDelegate里设置属性
@property (nonatomic, strong) RootViewController *rvc;
self.rvc = [[RootViewController alloc] init];
UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:self.rvc];
self.window.rootViewController = nc;
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
self.rvc.textField.text = [[url host] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
return
YES;
}
标签:
原文地址:http://www.cnblogs.com/xiu619544553/p/5194994.html