project_files/HedgewarsMobile/Classes/HedgewarsAppDelegate.m
branchios-revival
changeset 11309 402baa6d4f64
parent 11114 6a0bd9c6cc82
child 12872 00215a7ec5f5
equal deleted inserted replaced
11308:92b023095153 11309:402baa6d4f64
    17  */
    17  */
    18 
    18 
    19 
    19 
    20 #import "HedgewarsAppDelegate.h"
    20 #import "HedgewarsAppDelegate.h"
    21 #import "MainMenuViewController.h"
    21 #import "MainMenuViewController.h"
    22 
    22 #import "Appirater.h"
    23 
    23 
    24 @implementation SDLUIKitDelegate (customDelegate)
    24 @implementation SDLUIKitDelegate (customDelegate)
    25 
    25 
    26 // hijack the the SDL_UIKitAppDelegate to use the UIApplicationDelegate we implement here
    26 // hijack the the SDL_UIKitAppDelegate to use the UIApplicationDelegate we implement here
    27 +(NSString *)getAppDelegateClassName {
    27 +(NSString *)getAppDelegateClassName {
    48     [uiwindow release];
    48     [uiwindow release];
    49     [super dealloc];
    49     [super dealloc];
    50 }
    50 }
    51 
    51 
    52 // override the direct execution of SDL_main to allow us to implement our own frontend
    52 // override the direct execution of SDL_main to allow us to implement our own frontend
    53 -(void) postFinishLaunch {
    53 -(void) postFinishLaunch
       
    54 {
       
    55     // Setup Appirater
       
    56     [Appirater setAppId:@"391234866"];
       
    57     [Appirater setDaysUntilPrompt:3];
       
    58     [Appirater setUsesUntilPrompt:5];
       
    59     [Appirater setSignificantEventsUntilPrompt:-1];
       
    60     [Appirater setTimeBeforeReminding:1];
       
    61     //[Appirater setDebug:YES];
       
    62     
    54     [self performSelector:@selector(hideLaunchScreen) withObject:nil afterDelay:0.0];
    63     [self performSelector:@selector(hideLaunchScreen) withObject:nil afterDelay:0.0];
    55     
    64     
    56     [[UIApplication sharedApplication] setStatusBarHidden:YES];
    65     [[UIApplication sharedApplication] setStatusBarHidden:YES];
    57 
    66 
    58     self.uiwindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    67     self.uiwindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];