I have this working in C#, but don’t know where to go with Objective C (Xcode specifically).
I have 8 buttons
Stack1, Stack2, etc.
I want to choose Stack(variable) and change the image.
In C# I used
Button Stacks = this.Controls[“Stack” + StackNumber.ToString()] as Button;
Stacks.BackgroundImage = …..
Can I do this in Objective C also?
I hope I understand your question correctly. You want to change button’s image by clicking on another button. You can assign
tagproperty to your different buttons likestack1.tag = 1001; , stack2.tag = 1002; , stack3.tag = 1003;Now in your button click method :
Hope it gives an idea…