Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. func loadNewQuestion {
  2. //UIApplication.shared.beginIgnoringInteractionEvents()
  3. //self.view.isUserInteractionEnabled = false
  4. //change the question, answer, and array of possible answers
  5. }
  6.  
  7. func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
  8. let a = answers[indexPath.row]
  9. if a.descript.lowercased() == questionAnswer.descript.lowercased() //questionAnswer is the correct answer to the question {
  10. self.loadNewQuestion()
  11. self.collectionView.reloadData(onComplete: {
  12. //UIApplication.shared.endIgnoringInteractionEvents()
  13. //self.view.isUserInteractionEnabled = true
  14. })
  15. } else {
  16. //warn about wrong answer
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement