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
450
From Onboarding to Value Delivering in iOS
vc7
0
270
Merciless Refactoring
vc7
0
760
Protocol 的實例、測試和心得
vc7
2
800
共有経済
vc7
0
170
.gitignore
vc7
1
95
Git Workshop 03
vc7
0
120
Git Workshop 02
vc7
0
110
Escaping Closures in Swift - 公司內分享會
vc7
1
240
Other Decks in Programming
See All in Programming
Hack Claude Code with Claude Code
choplin
5
2.4k
Railsアプリケーションと パフォーマンスチューニング ー 秒間5万リクエストの モバイルオーダーシステムを支える事例 ー Rubyセミナー 大阪
falcon8823
5
1.4k
Rails Frontend Evolution: It Was a Setup All Along
skryukov
0
230
PHP 8.4の新機能「プロパティフック」から学ぶオブジェクト指向設計とリスコフの置換原則
kentaroutakeda
2
990
Modern Angular with Signals and Signal Store:New Rules for Your Architecture @enterJS Advanced Angular Day 2025
manfredsteyer
PRO
0
240
RailsGirls IZUMO スポンサーLT
16bitidol
0
190
Deep Dive into ~/.claude/projects
hiragram
14
8.4k
The Evolution of Enterprise Java with Jakarta EE 11 and Beyond
ivargrimstad
0
150
テスト駆動Kaggle
isax1015
1
490
Agentic Coding: The Future of Software Development with Agents
mitsuhiko
0
120
The Niche of CDK Grant オブジェクトって何者?/the-niche-of-cdk-what-isgrant-object
hassaku63
1
430
What's new in AppKit on macOS 26
1024jp
0
130
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
Adopting Sorbet at Scale
ufuk
77
9.5k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.9k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.4k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
21k
Music & Morning Musume
bryan
46
6.7k
Building Applications with DynamoDB
mza
95
6.5k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.4k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Fireside Chat
paigeccino
37
3.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
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牧犋ᥝॡፘמਥොጱ