I just started iPhone programming and would like to know how to tell when some buttons have been pressed and then add to a variable that will display in three labels. I connected the buttons and labels to the interface using IB.
I had the variable part figured out
A = 0 (goes in label1)
B = 0 (goes in label2)
C = 0 (goes in label3)
When Button1 is pressed (A += 1)
When Button2 is pressed (B += 1)
(C += (A + B))
Use Button1 and Button2 and label1, label2, label3 in an example please.
Any help would be greatly appreciated and I hope this is enough information to get a good code example.
I had the variable part figured out
A = 0 (goes in label1)
B = 0 (goes in label2)
C = 0 (goes in label3)
When Button1 is pressed (A += 1)
When Button2 is pressed (B += 1)
(C += (A + B))
Use Button1 and Button2 and label1, label2, label3 in an example please.
Any help would be greatly appreciated and I hope this is enough information to get a good code example.