Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func loadNewQuestion {
- //UIApplication.shared.beginIgnoringInteractionEvents()
- //self.view.isUserInteractionEnabled = false
- //change the question, answer, and array of possible answers
- }
- func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
- let a = answers[indexPath.row]
- if a.descript.lowercased() == questionAnswer.descript.lowercased() //questionAnswer is the correct answer to the question {
- self.loadNewQuestion()
- self.collectionView.reloadData(onComplete: {
- //UIApplication.shared.endIgnoringInteractionEvents()
- //self.view.isUserInteractionEnabled = true
- })
- } else {
- //warn about wrong answer
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement