NSMutableArray *questions=[NSMutableArray new];
//creating an array to save questions
// Place in viewDidLoad
for(;;) {
//randomly select question
QuestionSelected = arc4random() % 4;
//check if question contains this number
//if it does - continue looping
if(![questions containsObject:@(QuestionSelected)]){
//so it doesn't - we add this number to array
[questions addObject:@(QuestionSelected)];
break;
//and exit loop
}
}
Thats all