我想在主屏幕中选择应用程序时,在显示登录屏幕之前向服务器发送请求。
提前致谢
您可以检测到的任何应用程序都没有跳板图标点击方法或主屏幕图标选择方法,但是当您的应用程序图标在弹簧板上被点击时,然后在启动您的应用程序时首先调用下面的方法,这样您就可以编写代码向那里的服务器发送请求:-
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
// Override point for customization after application launch.
self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController" bundle:nil] autorelease];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}