Say that self is the object myObject and I do something like [self setDelegate:theDelegate]
From inside theDelegate how can I access myObject ?
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.
You can’t. Delegate doesn’t need to know about objects it’s delegating. Most of delegate methods have a parameter that holds a pointer to instance which called the delegate, in case delegate needs to interact with the delegated object upon receiving a message from it. That’s all you should ever do.
Example – change a background color of
UITextFieldinstance when it’s done with editing: