• 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
SDL_uikitappdelegate.h 1.12 KB