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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Lihsuan Chen
August 18, 2016
Programming
160
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
180
The UX thinking of PAY ID
vc7
2
500
From Onboarding to Value Delivering in iOS
vc7
0
310
Merciless Refactoring
vc7
0
830
Protocol 的實例、測試和心得
vc7
2
840
共有経済
vc7
0
210
.gitignore
vc7
1
130
Git Workshop 03
vc7
0
160
Git Workshop 02
vc7
0
140
Other Decks in Programming
See All in Programming
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
410
Vite+ Unified Toolchain for the Web
naokihaba
0
310
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
250
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
120
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
180
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
790
JavaDoc 再入門
nagise
1
360
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.1k
スマートグラスで並列バイブコーディング
hyshu
0
150
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.1k
CSC307 Lecture 17
javiergs
PRO
0
320
Creating Composable Callables in Contemporary C++
rollbear
0
140
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
390
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
330
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
1.7k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
The untapped power of vector embeddings
frankvandijk
2
1.8k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
Designing Experiences People Love
moore
143
24k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
How to build a perfect <img>
jonoalderson
1
5.7k
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牧犋ᥝॡፘמਥොጱ