Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. override func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
  2.  
  3. switch indexPath.item {
  4. case 7:
  5. switch boatTypeSelectedText {
  6. case "Royal Boat":
  7. if definitionSelectedText == "Used to carry the pharoah" {
  8. if let cell = collectionView.cellForItemAtIndexPath(indexPath) {
  9. cell.backgroundColor = UIColor.greenColor()
  10. }
  11. } else {
  12. self.performSegueWithIdentifier("Game End", sender: self)
  13. gameOutcomeLabel.text = "You Lost on level (selectLevelBoatMatchingGame.currentLevel)!"
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement