Last active
August 24, 2016 08:10
-
-
Save fitomad/db8afc0d5437b40fdc6221abcd93c39e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Definiendo el callback como tipo | |
// | |
typedef ResultCompletionHandler = (mensaje: String, tipo: String) -> (Void) | |
// | |
// Definido en la declaración del método | |
// | |
func findString(texto: String, completionHandler: (mensaje: String, tipo: String) -> (Void)) -> Void | |
{ | |
// ... hacemos cosas | |
completionHandler(mensaje: "Ejemplo", tipo: "String") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment