I don’t understand the concept of delegation is used in XCode. When a new project is created, an app delegate and a view controller are created, but what does the app delegate do? How does main.m know to call the delegate?
Share
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.
main.mdoesn’t call the delegate. The application object does that at runtime to let you customize the behaviour of your application without needing to subclass or do any other funny business. Delegation a pretty common feature of the Apple frameworks; reading their documentation or the Wikipedia page on delegation might be good choices to learn more.