Every app has an application delegate.
Where in the code that we specify/register that “SomeClass” (subclass of UIApplicationDelegate) is a delegate of my application ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you use Storyboarding, this is done in main.m with the line:
If the fourth argument to
UIApplicationMain()is notnil, the function will create an instance of the specified class and assign it as theUIApplicationobject’s delegate.If you don’t use Storyboarding, the connection is made in
MainWindow.xibwhere the application delegate object is created and connected as the delegate of the File’s Owner (which is theUIApplicationinstance, which in turn is created by theUIApplicationMain()function).