You can either keep references to your button and check like this:
Code:
if (touchedButton == button1) {
}
or you could set their tag properties and check like this:
Code:
if (touchedButton.tag == 1) {
}
If you go the tag way, I recommend using #define to define your tags. So:
Code:
#define kButton1Tag 1
#define kButton2Tag 2
//etc...
Then, use the defines to set and check:
Code:
//setting the tag
button1.tag = kButton1Tag;
//checking the tag
if (touchedButton.tag == kButton1Tag) {
}
__________________
If you are looking for a quality developer, I'm your man. Give me a PM if you are interested.
New app - See screenshots and details at
www.globaclock.com.
If you want to thank me, click the link. Every click counts. If you want to do more, buy my app. A link is available on my website. Thanks.