forum

Home / DeveloperSection / Forums / Delegate classes connection with two controls in Objective-C

Delegate classes connection with two controls in Objective-C

Anonymous User154709-Aug-2015

I've got two controls in my Interface Builder file, and each of those controls I've created a separate delegate class for in code (Control1Delegate and Control2Delegate). I created two "Objects" in interface builder, made them of that type, and connected the controls to them as delegates. The delegates work just fine. My problem is, I need to share information from one delegate to the other delegate, and I'm not sure how.

 

What is the best way to do this? Combine the two delegates into one class, or somehow access a third class that they can both read? Since I'm not actually initializing the class anywhere in my code, I'm not sure how to get a reference to the actual instance of it (if there is an actual instance of it), or even access the "main" class that the project came with.


Updated on 10-Aug-2015
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By