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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Lihsuan Chen
August 18, 2016
Programming
160
0
Share
Optional 遇到的問題 - 公司內分享會
這週主題是專案上使用 Swift 的 optional 時所碰到的問題。
包含了使用 [unowned self] 以及 @IBOutlet 時碰到的問題與解決的方式。
Lihsuan Chen
August 18, 2016
More Decks by Lihsuan Chen
See All by Lihsuan Chen
iPlayground 2025 - 接⼿ 10年⼤雜燴:專案現代化與產品開發的挑戰
vc7
0
160
The UX thinking of PAY ID
vc7
2
500
From Onboarding to Value Delivering in iOS
vc7
0
300
Merciless Refactoring
vc7
0
810
Protocol 的實例、測試和心得
vc7
2
830
共有経済
vc7
0
200
.gitignore
vc7
1
120
Git Workshop 03
vc7
0
160
Git Workshop 02
vc7
0
140
Other Decks in Programming
See All in Programming
おれのAgentic Coding 2026/03
tsukasagr
1
140
PDI: Como Alavancar Sua Carreira e Seu Negócio
marcelgsantos
0
100
Xdebug と IDE による デバッグ実行の仕組みを見る / Exploring-How-Debugging-Works-with-Xdebug-and-an-IDE
shin1x1
0
340
アーキテクチャモダナイゼーションとは何か
nwiizo
17
4.3k
AI活用のコスパを最大化する方法
ochtum
0
370
PHP 7.4でもOpenTelemetryゼロコード計装がしたい! / PHPerKaigi 2026
arthur1
1
530
Migration to Signals, Signal Forms, Resource API, and NgRx Signal Store @Angular Days 03/2026 Munich
manfredsteyer
PRO
0
240
SkillがSkillを生む:QA観点出しを自動化した
sontixyou
6
3k
2026-03-27 #terminalnight 変数展開とコマンド展開でターミナル作業をスマートにする方法
masasuzu
0
300
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
2
350
PHPで TLSのプロトコルを実装してみるをもう一度しゃべりたい
higaki_program
0
180
RSAが破られる前に知っておきたい 耐量子計算機暗号(PQC)入門 / Intro to PQC: Preparing for the Post-RSA Era
mackey0225
3
120
Featured
See All Featured
The SEO Collaboration Effect
kristinabergwall1
0
420
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
Building Adaptive Systems
keathley
44
3k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
510
Large-scale JavaScript Application Architecture
addyosmani
515
110k
RailsConf 2023
tenderlove
30
1.4k
Done Done
chrislema
186
16k
Google's AI Overviews - The New Search
badams
0
960
Ruling the World: When Life Gets Gamed
codingconduct
0
190
Become a Pro
speakerdeck
PRO
31
5.9k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Chasing Engaging Ingredients in Design
codingconduct
0
160
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牧犋ᥝॡፘמਥොጱ