I know that there are some solutions with shuffle, or something like that, but I dont know if I can apply them in my code. Can you please help me? How do I make the questions not repeat?
func RandomQuestions(){
var RandomNumber = arc4random() % 28
RandomNumber += 1
switch(RandomNumber){
case 1:
QuestionLabel.text = "Who is the Numer One Best DJ According to DJ Mag 2014?"
Button1.setTitle("Tiësto", forState: UIControlState.Normal)
Button2.setTitle("Avicii", forState: UIControlState.Normal)
Button3.setTitle("Hardwell", forState: UIControlState.Normal)
Button4.setTitle("Dimitri Vegas & Like Mike", forState: UIControlState.Normal)
CorrectAnwser = "3"
break
case 2:
QuestionLabel.text = "Who is the Only DJ that played in an Olimpic Games?"
Button1.setTitle("Avicii", forState: UIControlState.Normal)
Button2.setTitle("Tiësto", forState: UIControlState.Normal)
Button3.setTitle("Armin Van Buuren", forState: UIControlState.Normal)
Button4.setTitle("Calvin Harris", forState: UIControlState.Normal)
CorrectAnwser = "2"
break
}
/* ...more questions...* /
}