当我尝试添加代码时,我收到语义和解析问题。有谁知道我可以将它添加到我的应用程序的正确方法是什么?
第一组代码是我没有分析的原始代码,下一组代码是告诉我要放入我的应用程序的代码。有人可以建议我可以尝试的一组代码吗?
原始代码
(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:
(NSDictionary *)launchOptions
{
CGRect frame = [[UIScreen mainScreen] bounds];
myWindow = [[UIWindow alloc] initWithFrame: frame];
if (myWindow)
{
UIImageView *newView = [[UIImageView alloc] initWithFrame: frame];
if (newView)
{
UIImage *image = [UIImage imageNamed: @"Launch.png"];
if (image)
{
[newView setImage: image];
}
[newView setUserInteractionEnabled: YES];
UIGestureRecognizer *newRecognizer = [[UITapGestureRecognizer alloc] initWithTarget: self action: @selector(refresh)];
if (newRecognizer)
{
[newView addGestureRecognizer: newRecognizer];
[newRecognizer release];
}
[myWindow addSubview: newView];
[newView release];
}
[myWindow makeKeyAndVisible];
myModel = [[NBSHomeModel alloc] init];
[myModel setDelegate: self];
[myModel reload];
}
return YES;
}
这是 Flurry 指令中的代码
#import "Flurry.h"
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
[Flurry startSession:@"YOUR_API_KEY"];
//your code
}