Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Definiendo límites

Definiendo límites

Presentado en iOS Love en Diciembre, 2017

Francisco Díaz

December 14, 2017

Transcript

33 slides
  1. EVA BC programs provide vital support to anti- violence programs

    and communities across BC. — Ending Violence Association ONG
  2. Por feature → 1 Dev: Pantalla con botón en iOS

    app → 1 Dev: Today widget → 1 Dev: Knock
  3. class SuccessReportCreator: ReportCreator { func createReport() throws -> Report {

    return Report(id: "1", date: Date()) } } class ErrorReportCreator: ReportCreator { func createReport() throws -> Report { throw ReportCreationError.fakeError } }
  4. class BigPanicButtonViewController: UIViewController { private let reportCreator: ReportCreator init(reportCreator: ReportCreator)

    { self.reportCreator = reportCreator } func didTapBigPanicButton() { do { // Handle Report let report = try reportCreator.createReport() } catch { // Handle error } } }
  5. protocol APIRequester { func createReport() throws -> JSON } protocol

    SMSHandler { func sendSMS() throws -> SMS } protocol ConnectivityListener { var isConnected: Bool { get } }

More Decks by Francisco Díaz

Other Decks in Programming