• Sam Lantinga's avatar
    Allow overriding the app delegate on iOS · 5e1ffb1c
    Sam Lantinga authored
    Vittorio G.  to Eric, Sam
    
    Actually this is much simpler than i thought, I just had to specify a
    class method to get the delegate name and then the category can
    override that method!
    I've attached the patch that enables this features: in my code i could
    remove my custom main() and simply add
    
    @implementation SDLUIKitDelegate (customDelegate)
    +(NSString *)getAppDelegateClassName {
       return @"HedgewarsAppDelegate";
    }
    @end
    
    I tested it and with the sdl demos it loads the normal
    SDLUIKitDelegate, while in my code it loads my HedgewarsAppDelegate!
    5e1ffb1c
Name
Last commit
Last update
..
SDL_uikitappdelegate.h Loading commit data...
SDL_uikitappdelegate.m Loading commit data...
SDL_uikitevents.h Loading commit data...
SDL_uikitevents.m Loading commit data...
SDL_uikitkeyboard.h Loading commit data...
SDL_uikitopengles.h Loading commit data...
SDL_uikitopengles.m Loading commit data...
SDL_uikitopenglview.h Loading commit data...
SDL_uikitopenglview.m Loading commit data...
SDL_uikitvideo.h Loading commit data...
SDL_uikitvideo.m Loading commit data...
SDL_uikitview.h Loading commit data...
SDL_uikitview.m Loading commit data...
SDL_uikitwindow.h Loading commit data...
SDL_uikitwindow.m Loading commit data...
jumphack.c Loading commit data...
jumphack.h Loading commit data...
keyinfotable.h Loading commit data...