Large diffs are not rendered by default.

@@ -0,0 +1 @@
Arrow Right by useiconic.com from the Noun Project
@@ -0,0 +1,22 @@
//
// PokeInfoVC.swift
// Pokedex
//
// Created by Yosvani Lopez on 8/9/16.
// Copyright © 2016 Yosvani Lopez. All rights reserved.
//
import UIKit
class PokeInfoVC: UIViewController {
var pokemon: Pokemon!
@IBOutlet weak var name: UILabel!
@IBOutlet weak var pokeDescription: UILabel!
@IBOutlet weak var Weight: UILabel!
@IBOutlet weak var type: UILabel!
@IBOutlet weak var height: UILabel!
@IBOutlet weak var pokeId: UILabel!


override func viewDidLoad() {
super.viewDidLoad()
}
}
@@ -14,7 +14,6 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
// use instant initialization in order since we are creating empty object regardless
var pokemon = [Pokemon]()
var filteredPokemon = [Pokemon]()
var inSearchMode = false
override func viewDidLoad() {
super.viewDidLoad()
collectionView.dataSource = self
@@ -45,13 +44,12 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
filteredPokemon = pokemon
}
//runs everytime the input in the search bar is changed
//if there is no input show all pokemon else only show matching pokemon
func searchBar(searchBar: UISearchBar, textDidChange searchText: String) {
if searchBar.text == nil || searchBar.text == "" {
inSearchMode = false
view.endEditing(true)
filteredPokemon = pokemon
} else {
inSearchMode = true
let lower = searchBar.text!.lowercaseString
filteredPokemon = pokemon.filter({$0.name.rangeOfString(lower) != nil})
}
@@ -79,10 +77,20 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection


func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {

let poke = filteredPokemon[indexPath.row]
performSegueWithIdentifier("goToDetails", sender: poke)
}
func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int {
return 1
}
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue.identifier == "goToDetails" {
if let detailVC = segue.destinationViewController as? PokeInfoVC {
if let poke = sender as? Pokemon {
detailVC.pokemon = poke
}
}
}
}
}

@@ -12,7 +12,13 @@ class Pokemon {
// can put the exclamation when it is guaranteed to have the property
private var _name: String!
private var _pokeId: Int!

private var _description: String!
private var _height: String!
private var _weight: String!
private var _type: String!
private var _defense: String!
private var _attack: String!
private var _nextEvo: String!
var name: String {
return _name
}