问题
I have several different buttons, which are all segued modally to another ViewController that contains several UIimage views. What I'm trying to do is to create an IBAction for each button that will set images to the UIimageViews in the other ViewController. (my UIimageViews are @property(nonatomic, retina) and I have tried multiple codes like "setImage" and many others with no success) I wass wondering if this could be done by using tags?
THANKS!!!
回答1:
Use Delegates delegate. On button click invoke the selector on the delegate. In the selector set the image.
来源:https://stackoverflow.com/questions/23937599/using-a-button-to-change-an-image-in-a-uiimageview-in-a-separate-viewcontroller