This file contains hidden or 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
| import UIKit | |
| fileprivate extension CGFloat { | |
| static var fontSize: CGFloat = 16 | |
| static var defaultMargin: CGFloat = 24 | |
| } | |
| class ViewController: UIViewController { | |
| @IBOutlet weak var textLabel: UILabel! | |
| @IBOutlet weak var trailingTextLabel: NSLayoutConstraint! |
This file contains hidden or 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
| typealias Cachorro = (nome: String, raca: String) | |
| typealias Pessoa = (nome: String, cachorro: [Cachorro]) |
This file contains hidden or 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
| let gerlandio = ("Gerlandio", []) |
This file contains hidden or 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
| func pessoa(nomePessoa: String, cachorros: [Any], nomeCachorro: String, racaCachorro: String) -> Any { | |
| return "😱" | |
| } |
This file contains hidden or 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
| struct Cachorro { | |
| var nome: String | |
| var raca: String | |
| } | |
| struct Pessoa { | |
| var nome: String | |
| var cachorros: [Cachorro] | |
| } |
This file contains hidden or 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
| class Solucao { | |
| var pessoaLogada: Pessoa? | |
| func cadastrar(nome: String) { | |
| pessoaLogada = Pessoa(nome: nome, cachorros: []) | |
| } | |
| func adicionar(cachorro: Cachorro) { | |
| pessoaLogada?.tem(maisUm: cachorro) | |
| } |
This file contains hidden or 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
| var matador = Cachorro(nome: "Matador", raca: "Chihuahua") | |
| var gerlandio = Pessoa(nome: "Gerlandio", cachorros: []) | |
| gerlandio.tem(maisUm: matador) |
This file contains hidden or 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
| struct Cachorro { | |
| var nome: String | |
| var raca: String | |
| func latir() { | |
| print("\(nome) latiu!") | |
| } | |
| } | |
| struct Pessoa { |
This file contains hidden or 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
| import RxSwift | |
| import RxCocoa | |
| let BASE_URL = "" | |
| enum HttpMethod: String { | |
| case get = "GET" | |
| case post = "POST" | |
| } |
This file contains hidden or 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
| import Foundation | |
| let BASE_URL = "" | |
| enum HttpMethod: String { | |
| case get = "GET" | |
| case post = "POST" | |
| } | |
| protocol HttpObserver: AnyObject { |
NewerOlder