What I am trying to do is click a button (that was created in code) and have it call up a different view controller then have it run a function in the new view controller.
A lot of good answers are already added. Though I want to add something which suits me most of the time.
#define kAppDelegate ((YourAppDelegate *)[[UIApplication sharedApplication] delegate]);
and thats it. Use it throughout the application just like a constant.
e.g.
[kAppDelegate methodName];
Don't forget to import yourAppDelegate.h in corresponding .pch or macros file.