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
Lihsuan Chen
August 18, 2016
Programming
0
150
Optional 遇到的問題 - 公司內分享會
這週主題是專案上使用 Swift 的 optional 時所碰到的問題。
包含了使用 [unowned self] 以及 @IBOutlet 時碰到的問題與解決的方式。
Lihsuan Chen
August 18, 2016
Tweet
Share
More Decks by Lihsuan Chen
See All by Lihsuan Chen
iPlayground 2025 - 接⼿ 10年⼤雜燴:專案現代化與產品開發的挑戰
vc7
0
110
The UX thinking of PAY ID
vc7
2
470
From Onboarding to Value Delivering in iOS
vc7
0
290
Merciless Refactoring
vc7
0
770
Protocol 的實例、測試和心得
vc7
2
810
共有経済
vc7
0
180
.gitignore
vc7
1
100
Git Workshop 03
vc7
0
130
Git Workshop 02
vc7
0
130
Other Decks in Programming
See All in Programming
Swift Concurrency - 状態監視の罠
objectiveaudio
2
520
Le côté obscur des IA génératives
pascallemerrer
0
140
技術的負債の正体を知って向き合う / Facing Technical Debt
irof
0
170
なぜあの開発者はDevRelに伴走し続けるのか / Why Does That Developer Keep Running Alongside DevRel?
nrslib
3
400
TFLintカスタムプラグインで始める Terraformコード品質管理
bells17
2
170
その面倒な作業、「Dart」にやらせませんか? Flutter開発者のための業務効率化
yordgenome03
1
130
ALL CODE BASE ARE BELONG TO STUDY
uzulla
18
3.5k
After go func(): Goroutines Through a Beginner’s Eye
97vaibhav
0
390
Six and a half ridiculous things to do with Quarkus
hollycummins
0
170
コードとあなたと私の距離 / The Distance Between Code, You, and I
hiro_y
0
160
Leading Effective Engineering Teams in the AI Era
addyosmani
4
390
育てるアーキテクチャ:戦い抜くPythonマイクロサービスの設計と進化戦略
fujidomoe
1
170
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Rails Girls Zürich Keynote
gr2m
95
14k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
We Have a Design System, Now What?
morganepeng
53
7.8k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Bash Introduction
62gerente
615
210k
GitHub's CSS Performance
jonrohan
1032
470k
Git: the NoSQL Database
bkeepers
PRO
431
66k
GraphQLとの向き合い方2022年版
quramy
49
14k
The World Runs on Bad Software
bkeepers
PRO
72
11k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
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牧犋ᥝॡፘמਥොጱ