How can we access UIButton of other class. i.e. We have a class A and Button ButtonA . When ButtonA clicked then it will add a SubView ViewB on App Delegate Window . Now when Somebody clicks ButtonB on ViewB then i want to change ButtonA image?
How can i do that?
Class B is singleton class
You have to make accessible
Class AfromClass B, you have lots of options, for instance some of them:Class Ainstance variable in yourClass B, and assign it when creatingclass BfromClass A.Class Bto be called whenButton Bis clicked.Class Alisten to aNSNotificationthat posted byClass B.KVOfromClass AtoClass B's Button Bto listen for changes on it.