swift - uma fama repentina
DESCRIPTION
TDC POA 2014 - trilha MobileTRANSCRIPT
![Page 1: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/1.jpg)
SwiftUma fama repentina!
![Page 2: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/2.jpg)
Oi!
Hanneli (a.k.a. @hannelita)!
Desenvolvedora @Codeminer42!
Jogos!
Café, Lego, Pokémon e bichos <3
HIRING
![Page 3: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/3.jpg)
O que *NÃO* vamos ver aqui
Objective C é melhor que Swift!
Desenvolvedora com 5 anos de exp em Swift!
Evangelização de Swift!
Teorias chatas zzzzzzzz
![Page 4: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/4.jpg)
O que *vamos* ver aqui
Alguns enroscos do Objective C !
O que os desenvolvedores sentiam falta!
Swift - resolvendo alguns desses buracos!
Swift - bizarrices!
GIFs e imagens legais <3
![Page 5: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/5.jpg)
Desenvolvendo
Objective C
iOS
Xcode
SQLite
Foundation
C
C++
UIKit CoreGraphics
CoreServices
CoreLocation
ARC
![Page 6: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/6.jpg)
Desenvolvendo
![Page 7: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/7.jpg)
iOS Development
[ ][ ][ ][ ]
![Page 8: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/8.jpg)
Se fosse só isso…
Agonia
![Page 9: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/9.jpg)
Quem nunca…
Saiu implementando no .m
E esqueceu de colocar no .h ?
![Page 10: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/10.jpg)
Quem nunca…
![Page 11: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/11.jpg)
Quem nunca…
Não sabia o tipo de retorno de uma API…
E colocou um tipo nada a ver…
Porque não tinha documentação?
![Page 12: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/12.jpg)
Quem nunca…
![Page 13: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/13.jpg)
Quem nunca…
Tomou um erro de compilação…
Porque faltou um simples
; ?
![Page 14: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/14.jpg)
Quem nunca…
![Page 15: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/15.jpg)
Noooo
![Page 16: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/16.jpg)
Noooo
![Page 17: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/17.jpg)
SWIFT!
![Page 18: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/18.jpg)
YEEES
![Page 19: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/19.jpg)
O Swift suaviza quase tudo isso
![Page 20: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/20.jpg)
.m e .h no mesmo lugar
![Page 21: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/21.jpg)
auto-detecta os tipos
![Page 22: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/22.jpg)
auto-detecta os tipos
var tdc : String = "TDC"
var tdc = "TDC"
![Page 23: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/23.jpg)
Não precisa de ;
![Page 24: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/24.jpg)
Consigo chamar métodos sem []
![Page 25: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/25.jpg)
FAVOR NÃO TROLLAR
![Page 26: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/26.jpg)
**NÃO**
var tdc = 2014!tdc = “Oi!"
![Page 27: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/27.jpg)
**NÃO**
var meusNumerosLegais = ![1,33,345,349]
meusNumerosLegais.append(“trololol")
![Page 28: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/28.jpg)
**NÃO**
var numero : Int = 0
numero = nil
![Page 29: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/29.jpg)
Swift possui algumas 'bizarrices'
Optionals
![Page 30: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/30.jpg)
Swift possui algumas 'bizarrices'
Optionals∆ Existe um valor e ele é igual a
alguma coisa
∆ Não existe NENHUM valor
![Page 31: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/31.jpg)
Swift possui algumas 'bizarrices'
Optionals
![Page 32: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/32.jpg)
Swift possui algumas 'bizarrices'
Optionals
Vamos ver um pouco de código
![Page 33: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/33.jpg)
Swift possui algumas 'bizarrices'
Optionals
1. Meet Playground!
![Page 34: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/34.jpg)
Optionals
![Page 35: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/35.jpg)
Optionals
let palestrasCount = hanneli.palestras!.quantidade
Não FUNCIONAAA fsdhufuhfsuhfhuefwkfhudfs
![Page 36: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/36.jpg)
Optionals
![Page 37: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/37.jpg)
Optionals
Não tenho um objeto Palestra!
Instanciamos um!
Não tem nenhum valor MESMO!
![Page 38: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/38.jpg)
Optionals
![Page 39: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/39.jpg)
MOAR cool stuffTraz um pouco de ‘FP' (Programação funcional)!
Closure!
Tuple!
Generics!
Map e Filters
![Page 40: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/40.jpg)
Is it production ready?
![Page 41: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/41.jpg)
Is it production ready?Existem poucos exemplos!
Existe pouco material de estudo!
Existe menos conteúdo no StackOverflow!
A IDE da Apple dá uns paus!
![Page 42: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/42.jpg)
DISCLAIMER
MINHA VISÃO
Você não precisa concordar, discordar ou achar que estou xingando/elogiando
![Page 43: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/43.jpg)
Minha visãoSwift: BACANA! Traz um pouco de ‘Ruby-like' para o mundo de iOS!
Menos verboso! :D!
Alguns conceitos confusos!
Como muitas vertentes de FP, temos que lidar com . ! e etc.
![Page 45: Swift - uma fama repentina](https://reader033.vdocuments.pub/reader033/viewer/2022050905/54c3aaa34a795967518b45bf/html5/thumbnails/45.jpg)
Referênciashttp://www.slideshare.net/talesp/swift-optionals !
http://www.slideshare.net/jollen/mokoversity-course-swift-101-3-hours?qid=525c7536-b9e1-4d45-b8da-0447854f6a93&v=qf1&b=&from_search=1!
http://www.slideshare.net/giordano/a-swift-introduction-to-swift?next_slideshow=1!
http://www.slideshare.net/giordano/a-swift-introduction-to-swift?next_slideshow=1!
http://www.slideshare.net/ThoughtWorks/taking-swiftfora-spinmrc?qid=525c7536-b9e1-4d45-b8da-0447854f6a93&v=qf1&b=&from_search=10!
http://www.slideshare.net/newgenapps/developing-ios-apps-with-swift?qid=525c7536-b9e1-4d45-b8da-0447854f6a93&v=qf1&b=&from_search=11!
Apple Official Reference