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
170
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
190
The UX thinking of PAY ID
vc7
2
510
From Onboarding to Value Delivering in iOS
vc7
0
310
Merciless Refactoring
vc7
0
830
Protocol 的實例、測試和心得
vc7
2
850
共有経済
vc7
0
210
.gitignore
vc7
1
130
Git Workshop 03
vc7
0
160
Git Workshop 02
vc7
0
150
Other Decks in Programming
See All in Programming
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
200
霧の中の代数的エフェクト
funnyycat
1
460
テーブルをDELETEした
yuzneri
0
130
プロポーザルを書いてもらう
pvcresin
0
160
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
150
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
1
470
ITヒヤリハットを整理してみた ~ライフサイクルと原因から考える再発防止策~
koukimiura
1
140
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
230
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
290
AI時代、エンジニアはどう育つのか -未経験エンジニアの成長を間近で見て考えたこと-
thasu0123
0
210
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
660
数百円から始めるRuby電子工作
tarosay
0
130
Featured
See All Featured
Navigating Team Friction
lara
192
16k
How to build a perfect <img>
jonoalderson
1
5.8k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.2k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
119
120k
Site-Speed That Sticks
csswizardry
13
1.4k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
390
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
920
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
460
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.5k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.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牧犋ᥝॡፘמਥොጱ