Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Optional 遇到的問題 - 公司內分享會
Search
Li-Hsuan Chen
August 18, 2016
Programming
0
150
Optional 遇到的問題 - 公司內分享會
這週主題是專案上使用 Swift 的 optional 時所碰到的問題。
包含了使用 [unowned self] 以及 @IBOutlet 時碰到的問題與解決的方式。
Li-Hsuan Chen
August 18, 2016
Tweet
Share
More Decks by Li-Hsuan Chen
See All by Li-Hsuan Chen
The UX thinking of PAY ID
vc7
2
430
From Onboarding to Value Delivering in iOS
vc7
0
250
Merciless Refactoring
vc7
0
720
Protocol 的實例、測試和心得
vc7
2
770
共有経済
vc7
0
160
.gitignore
vc7
1
82
Git Workshop 03
vc7
0
110
Git Workshop 02
vc7
0
100
Escaping Closures in Swift - 公司內分享會
vc7
1
220
Other Decks in Programming
See All in Programming
ASP. NET CoreにおけるWebAPIの最新情報
tomokusaba
0
370
Kubernetes History Inspector(KHI)を触ってみた
bells17
0
220
Grafana Cloudとソラカメ
devoc
0
170
2024年のWebフロントエンドのふりかえりと2025年
sakito
2
240
負債になりにくいCSSをデザイナとつくるには?
fsubal
9
2.4k
sappoRo.R #12 初心者セッション
kosugitti
0
250
Linux && Docker 研修/Linux && Docker training
forrep
24
4.5k
Writing documentation can be fun with plugin system
okuramasafumi
0
120
自分ひとりから始められる生産性向上の取り組み #でぃーぷらすオオサカ
irof
8
2.7k
苦しいTiDBへの移行を乗り越えて快適な運用を目指す
leveragestech
0
510
なぜイベント駆動が必要なのか - CQRS/ESで解く複雑系システムの課題 -
j5ik2o
10
3.5k
社内フレームワークとその依存性解決 / in-house framework and its dependency management
vvakame
1
560
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.2k
Embracing the Ebb and Flow
colly
84
4.6k
Unsuck your backbone
ammeep
669
57k
Facilitating Awesome Meetings
lara
51
6.2k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Documentation Writing (for coders)
carmenintech
67
4.6k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Gamification - CAS2011
davidbonilla
80
5.1k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
114
50k
Transcript
遇到的問題 Optional 陳 澧萱 @ 午餐分享會 2016/08/18
目錄 • [unowned self] • @IBOutlet త !
[unowned self]
Crash TFMGඃᬶ์ޙ ࡏDMPTVSFཫݺڣTFMGDSBTI ʢᙛ൛ຊҎ্ʣ
解決方法 Ŏ አ[weak self] Ŏ 矑茐አguard letᴠ纠
@IBOutlet 的 !
@IBOutlet Ŏ 䨝ڊԪጱ碻秚牫 Ŏ viewDidLoad()ฎloadView()ԏ獮 Ŏ ౮㹓虋碍ಅࣁጱᇔկᤩ朰硯ധԧ @IBOutlet var messageLabel:
UILabel!
結語 Ŏ ဳLPSOLFLWO\XQZUDSSHGRSWLRQDO Ŏ 胼犋ᥝአ牧疰犋ᥝአ Ŏ ဳᇔկጱOLIHF\FOH牧犋ᥝॡፘמਥොጱ