how to random placement of UIButton and value

前端 未结 8 1404
南方客
南方客 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:21

    create your own class with these 4 buttons. In this class you can store the positions of your buttons. then you can add a member function (something like the following) which will draw them:

    -(void)drawButtonsWithIncorrectAtIndex:(int)index
    

提交回复
热议问题