Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Optional 遇到的問題 - 公司內分享會
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
210
The UX thinking of PAY ID
vc7
2
520
From Onboarding to Value Delivering in iOS
vc7
0
320
Merciless Refactoring
vc7
0
830
Protocol 的實例、測試和心得
vc7
2
860
共有経済
vc7
0
220
.gitignore
vc7
1
130
Git Workshop 03
vc7
0
160
Git Workshop 02
vc7
0
150
Other Decks in Programming
See All in Programming
FreeBSDでZabbixを動かす
kenkino
0
360
ジョジョの世界をXRで再現する
mofurune
0
140
JRuby: Past, Present, and Future
headius
0
220
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
320
プロダクトコードからライブラリの境界を見つける
elmetal
PRO
0
110
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
2.9k
APNsからLive Activityを開始する話
yumnumm
0
150
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
140
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
360
パーソナライズPodcastを作った話
repunit11
0
130
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
720
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
140
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Designing Experiences People Love
moore
143
24k
How to Talk to Developers About Accessibility
jct
2
560
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
510
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
290
Navigating Weather and Climate Data
rabernat
0
550
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
2
350
Unsuck your backbone
ammeep
672
58k
Visualization
eitanlees
153
17k
A Soul's Torment
seathinner
8
3.7k
Claude Code のすすめ
schroneko
67
230k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
310
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牧犋ᥝॡፘמਥොጱ