how to random placement of UIButton and value

前端 未结 8 1263
南方客
南方客 2021-01-28 22:48

i have a question view and will show 4 answers, only 1 are correct.

but i do not want the same button to be always the correct answer.

i will like to know how do

8条回答
  •  礼貌的吻别
    2021-01-28 23:08

    You can create the buttons in same position always and randomize the labels on the button. If you are using an array to provide labels like val1, val2, val3 etc, you can randomize the array.

提交回复
热议问题