         
     }
     
+    //load the table view based off the items array
     func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell{
         
         let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath)

        
        personInfo = newInfo!
        
        var newItemArr = newItem!.componentsSeparatedByString(" ")
        
        let firstName: String = newItemArr[0].lowercaseString
        let lastName: String = newItemArr[1].lowercaseString
        var date: String = newItemArr[2]
        
        if date.rangeOfString("/") != nil{
            
            var newDateArr = date.componentsSeparatedByString("/")
            
            date = newDateArr[0] + "_" + newDateArr[1] + "_" + newDateArr[2]
            
            let submitString = firstName + "_" + lastName + "_" + date
            
            print(submitString)
            
            items.append(newItem!)
            textField.resignFirstResponder()
            
            textField.text = ""
            textFieldPerson.text = personInfo
            tableView.reloadData()
            
            saveCoreVariables()
            
            
        } else {
            
            alert("Date", alertMessage: "Invalid date input")
            
        }
    
        
    }
    

//  Copyright © 2015 Samy Achour. All rights reserved.
//

import Parse
import UIKit

class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {

    var personInfo: String = ""
    var items = [String]()
    
    //Implement this to prevent people from signing in their friends
    //var changePersonInfoCount = 0
    
    @IBOutlet var textField: UITextField!
    
