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.>
And if anyone is wondering how to do this in swift:
swift
if let myDelegate = UIApplication.sharedApplication().delegate as? AppDelegate { myDelegate.someMethod() }