I have an array full of buttons and when a use clicks one I would like to search the array for it.
Yes, I have given the buttons tags, but they are used for another purpose. So I am hoping that there is another way to check for equality.
I was hoping that I would be able to do something like button1.frame.origin == button2.frame.origin, but the compiler doesnt like that.
You can use the method
bool CGRectEqualToRect(CGRect rect1, CGRect rect2). Just pass in both of the button’s frames as parameters into this method and it’ll return a bool stating whether they are equal.