     override func viewDidAppear(animated: Bool)
     {
         super.viewDidAppear(animated)
+        
         if let selected = tableView.indexPathForSelectedRow() {
             tableView.deselectRowAtIndexPath(tableView.indexPathForSelectedRow()!, animated: animated)
         }

        }
    }

    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        let index = tableView.indexPathForSelectedRow()?.row
        let tweet = tweetsTableViewDelegate.tweets[index!]
        (segue.destinationViewController.view as UITextView).text = tweet.description()
    }
    
    func textFieldShouldReturn(textField: UITextField!) -> Bool {
        if !textField.text.isEmpty {
            buttonWasTapped(nil)
        }
        return textField.resignFirstResponder()
    }

    @IBAction func textFieldDidChange(sender : AnyObject) {
        button.enabled = !textField.text.isEmpty
        button.layer.borderColor = button.titleLabel?.textColor.CGColor
    }

    @IBAction func buttonWasTapped(sender : AnyObject?) {
        textField.resignFirstResponder()
        spinner.startAnimating()
        

    @IBOutlet var button : UIButton!
    @IBOutlet var tableView : UITableView!

    override func viewDidLoad()
    {
        super.viewDidLoad()
        
        textField.rightView = spinner
        textField.rightViewMode = .Always
        
