Méthode appelée suite à un clic sur la touche ‘enter’.
func textFieldShouldReturn(textField:UITextField) -> Bool{
return true
}
Méthodes appelées suite à réception ou à la perte du focus.
// Réception du focus - first responder
func textFieldDidBeginEditing(textField:UITextField) {
println("textFieldDidBeginEditing")
textField.textColor = UIColor.redColor()
}
// Perte de focus
func textFieldDidEndEditing(textField:UITextField) {
println("textFieldDidEndEditing")
textField.textColor = UIColor.blackColor()
}
// Appelée à la création de la table
func tableView(tableView: UITableView, numberOfRowsInSection: NSInteger) -> Int {
return tableau.count
} // numberOfRowsInSection
// Appelée à chaque fois qu'une cellule est affichée
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell! {
return uneCellule
} // cellForRowAtIndexPath