Button to add value to array and then compare result with another array on IPhone.
Posted
by slickplaid
on Stack Overflow
See other posts from Stack Overflow
or by slickplaid
Published on 2010-03-13T03:41:44Z
Indexed on
2010/03/13
3:47 UTC
Read the original article
Hit count: 200
I have ten buttons that each correspond to a different number. I'm looking to record the order that these buttons are pressed and enter them into an array and then compare it to another array that is static in the app. The check should be done on the Nth button press, where N equals the number of items in the other, static array.
How do I A) have a button press add a value to an array B) stop after Nth button press equal to amount of numbers in the array I'm checking against and C) compare this array to the other array?
© Stack Overflow or respective owner