Make +sharedAppDelegate return a generic object instead of a SDLUIKitDelegate.
This way subclasses can use it without a lot of casting. Thanks to Vittorio Giovara for the patch!
This commit is contained in:
parent
3d371a2143
commit
269da4cbfb
2 changed files with 3 additions and 3 deletions
|
@ -24,7 +24,7 @@
|
||||||
@interface SDLUIKitDelegate : NSObject<UIApplicationDelegate> {
|
@interface SDLUIKitDelegate : NSObject<UIApplicationDelegate> {
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (SDLUIKitDelegate *)sharedAppDelegate;
|
+ (id) sharedAppDelegate;
|
||||||
+ (NSString *)getAppDelegateClassName;
|
+ (NSString *)getAppDelegateClassName;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -79,10 +79,10 @@ static void SDL_IdleTimerDisabledChanged(const char *name, const char *oldValue,
|
||||||
@implementation SDLUIKitDelegate
|
@implementation SDLUIKitDelegate
|
||||||
|
|
||||||
/* convenience method */
|
/* convenience method */
|
||||||
+ (SDLUIKitDelegate *)sharedAppDelegate
|
+ (id) sharedAppDelegate
|
||||||
{
|
{
|
||||||
/* the delegate is set in UIApplicationMain(), which is garaunteed to be called before this method */
|
/* 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
|
+ (NSString *)getAppDelegateClassName
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue