True Random Xcode

后端 未结 4 1031
耶瑟儿~
耶瑟儿~ 2021-01-26 02:01

I\'m currently making a quiz app. When a user starts the quiz random questions show up like you would expect from a quiz app. The problem is, it is not quite random. It does sho

4条回答
  •  無奈伤痛
    2021-01-26 02:26

    Put your questions in an array and put the random number in the objectWithIndex method of NSMutableArray. Then remove the question from the array. Whenever a index is chosen, but there is not a question anymore, try it again.

提交回复
热议问题