Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Make +sharedAppDelegate return a generic object instead of a SDLUIKit…

…Delegate.

This way subclasses can use it without a lot of casting.

Thanks to Vittorio Giovara for the patch!
  • Loading branch information
icculus committed Nov 20, 2011
1 parent 4262a04 commit 692d72357a5ccbaffd013457235b184648a3b1c6
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/video/uikit/SDL_uikitappdelegate.h
  2. +2 −2 src/video/uikit/SDL_uikitappdelegate.m
@@ -24,7 +24,7 @@
@interface SDLUIKitDelegate : NSObject<UIApplicationDelegate> {
}

+ (SDLUIKitDelegate *)sharedAppDelegate;
+ (id) sharedAppDelegate;
+ (NSString *)getAppDelegateClassName;

@end
@@ -79,10 +79,10 @@ static void SDL_IdleTimerDisabledChanged(const char *name, const char *oldValue,
@implementation SDLUIKitDelegate

/* convenience method */
+ (SDLUIKitDelegate *)sharedAppDelegate
+ (id) sharedAppDelegate
{
/* the delegate is set in UIApplicationMain(), which is garaunteed to be called before this method */
return (SDLUIKitDelegate *)[[UIApplication sharedApplication] delegate];
return [[UIApplication sharedApplication] delegate];
}

+ (NSString *)getAppDelegateClassName

0 comments on commit 692d723

Please sign in to comment.