When developing for the Mac or the iPhone we frequently run into the situation of needing to grab the delegate. Thankfully this is stored in a singleton object and very easy to fetch:
#import "MyAppDelegate.h"
...
MyAppDelegate *delegate = [[UIApplication sharedApplication] delegate];