2014-02-19 64 views
-1
#import "AppDelegate.h" 
#import "Scringo/scringo.h" 

@implementation AppDelegate 

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{ 
    // Override point for customization after application launch. 
    return YES; 

    [Scringo initWithAppId:@"" completion:nil]; 

} 

- (void)applicationWillResignActive:(UIApplication *)application 
{ 
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 
    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 
} 

-我在哪裏把[Scringo initWithAppId:@「」completion:nil];

這是正確的位置?側邊欄不會在模擬器中溜出去,我沒有得到任何錯誤?...幫助

+3

把代碼之後'return'說法是毫無意義的。它永遠不會被達到。 – rmaddy

+0

那我應該把它放在哪裏?當我把它放在回報是的應用程序只是崩潰... – user3239649

+0

我不知道什麼行應該或應該調用,但嘗試把它放在'返回'的電話之前。 – rmaddy

回答

0

使用return語句之前,

-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 

{ 
    [Scringo initWithAppId:@"YOUR_SCRINGO_APP_ID" completion:nil]; 
    // Override point for customization after application launch. 
    return YES; 


}