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
【Swift】Extension 的延伸用法
Search
Richard Kao
November 04, 2016
Technology
270
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
【Swift】Extension 的延伸用法
extension(擴展)除了用在一些我們慣例的用途上,
它其實可以讓我們的 code 更易讀!
#實習 #公司分享會 #Swift
Richard Kao
November 04, 2016
More Decks by Richard Kao
See All by Richard Kao
【Swift】Protocol 命名 - Convertible
exp50000
1
200
【Swift】在 Protocol extension 內使用 Selector 發生的案例
exp50000
0
130
【Data】我所碰到的 JSON
exp50000
0
69
【iOS】Google Map SDK V.S. MapKit
exp50000
0
110
【iOS】View Hierarchy
exp50000
0
140
【iOS】Auto Layout
exp50000
0
60
【iOS】Clip Subviews
exp50000
0
82
【Swift】 Tutorial Resource
exp50000
0
66
Other Decks in Technology
See All in Technology
FactoryBotアンチパターン / factory_bot anti-patterns
toshimaru
0
140
OR学会2026年秋期大会_機械学習と数理最適化の融合による、配合レシピ最適化システム開発事例
brainpadpr
0
120
ハードウェアコンペでもAI駆動開発が進んでいる話
iotengineer22
1
670
AI時代に必要な脅威モデリング― 変化の速度に負けない理解とリスク判断
masakane55
5
1.2k
メルペイ 会計システム概要と歴史
mewuto
0
200
大型犬好きによるPugの紹介
yamanoku
1
110
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
430
Essential architectural thinking (revised edition)
ufried
0
110
IoTデバイスを繋げるプロトコルMatterをAndroidで使用する方法
harutiro
0
120
Incremental HTTP
kazuho
5
2.1k
OSC2026on_the-world-is-waiting-for-your-voice.pdf
naruoga
0
370
継続的なAIコスト最適化
bgpat
1
280
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
96
6.9k
Accessibility Awareness
sabderemane
1
240
Large-scale JavaScript Application Architecture
addyosmani
516
110k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
450
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
340
Mobile First: as difficult as doing things right
swwweet
225
10k
We Are The Robots
honzajavorek
0
390
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
320
Tell your own story through comics
letsgokoyo
1
1.1k
How to Think Like a Performance Engineer
csswizardry
28
2.9k
The SEO Collaboration Effect
kristinabergwall1
1
590
Deep Space Network (abreviated)
tonyrice
0
360
Transcript
Extension
硌疻疰ฎݻӞ㮆૪磪 ጱ觊獨牏奾䯤ڜ膐ࣳ獨 Ⴒے碝ۑ胼(functionality)
֕ᴻ種ԏक़牧 ਙ螭ݢ犥 ꔇꔇ
More Readable !!!!
Private Helper Functions 㼟*OUFSOBMGVODUJPO騈1SJWBUFGVODUJPOⴕ
private extension Something { // private ጱ䩚ᥜ㮉 }
Grouping 䪾GVODUJPOⴕⴽ겳䵩ꂂ."3,
extension Somthing { // 战蚤 Style 磪橕 } extension Something
{ // 战蚤 XXX 磪橕 }
Protocol Conformance 欽⢵$POGPSNUP1SPUPDPM䧴僽⢪欽1SPUPDPM酭涸GVODUJPO
extension Somthing: 礓Protocol { // Protocol ጱᥝ穩 }
Models 䪾鎙皿㿂䚍ㄤ⮭㶸㿂䚍ⴕ⢵
Struct 礓Model { // 㱪ਂ痀 } extension 礓Model { //
懯ᓒ痀 }
Others