Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Getting a reference to UIApplication delegate in Objective-C
#import "GetAppDelegateViewController.h"
@implementation GetAppDelegateViewController
- (void)viewDidLoad {
[super viewDidLoad];
MyAppDelegate *delegate = (MyAppDelegate *)[[UIApplication sharedApplication] delegate];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.