select a random button from array
I have to hide one of mine four UIButtons, randomly selected, BUT
Excepting one.
for this, I created a NSMutableArray, and added all button there, as
following example:
rand_btns = [[NSMutableArray alloc] initWithObjects: _bt1, _bt2, _bt3,
_bt4,nil];
No, each button has its own tag: _bt1 has tag 1, _bt2 has tag 2, and so...
Please, any ideas? I want to hide one random button, but excepting a
button which has tag equal to my: int Level.
I want to use this for a Quiz App.
So, my int Level is from 1-4 random number, when one of mine four buttons
has tag equal to mine int Level, that button should be excepted from
hiding.
No comments:
Post a Comment