在iOS应用程序中启动url而不是启动屏幕
在我的IOS基于web的应用程序中,每次用户打开应用程序时,我都需要启动一个动画,该应用程序有一个url,而不是下面的启动屏幕:在iOS应用程序中启动url而不是启动屏幕,ios,objective-c,url,webview,Ios,Objective C,Url,Webview,在我的IOS基于web的应用程序中,每次用户打开应用程序时,我都需要启动一个动画,该应用程序有一个url,而不是下面的启动屏幕: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { LaunchViewController * lvc = [[LaunchViewController all
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
LaunchViewController * lvc = [[LaunchViewController alloc] initWithNibName:@"LaunchViewController" bundle:nil];
glaunchOptions = launchOptions;
.
.
.
}
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
{
NSLog(@"This is the URL" , url) ;
BeepViewController * lvc = [[BeepViewController alloc] initWithNibName:@"BeepViewController" bundle:nil];
UINavigationController *navVC = (UINavigationController *)self.window.rootViewController;
if (navVC) {
[navVC pushViewController:lvc animated:NO];
}
[self.window makeKeyAndVisible];
return YES ;
}
OpenURL函数用于通过按基于web的按钮在我的应用程序中打开页面。
例如,我的url是:name.mobi/app/yyy.html
有什么帮助吗?尝试阅读有关Objective-C:自定义URL方案的模式 您应该使用此方法从URL处理打开的应用程序:
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
// handler code here
}
您可以使用此方法显示屏幕:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UINavigationController *root = [[UINavigationController alloc]initWithRootViewController:[storyboard instantiateViewControllerWithIdentifier:@"BeepViewController"]];
self.window.rootViewController= root;
要打开URL,请使用以下代码段:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.path.com"]];
尝试阅读有关Objective-C:自定义URL方案的模式 您应该使用此方法从URL处理打开的应用程序:
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
// handler code here
}
您可以使用此方法显示屏幕:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UINavigationController *root = [[UINavigationController alloc]initWithRootViewController:[storyboard instantiateViewControllerWithIdentifier:@"BeepViewController"]];
self.window.rootViewController= root;
要打开URL,请使用以下代码段:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.path.com"]];
我使用此函数从Web视图按钮打开此应用程序中的页面。那么我如何才能将启动url添加到它?将启动url添加到iOS应用程序中的页面?我想使用包含一个小动画的url启动我的应用程序,不是从启动屏幕是的,问题是什么将ViewController的外观设置为动画问题是如何在启动应用程序时调用url。url应在进入应用程序之前启动。我使用此功能从w webView按钮从此应用程序打开页面。那么我如何才能将启动url添加到它?将启动url添加到iOS应用程序中的页面?我想使用包含一个小动画的url启动我的应用程序,不是从启动屏幕是的,问题是什么?将ViewController的外观动画化问题是在启动应用程序时如何调用url。url应在进入应用程序之前启动