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
【Swift】Extension 的延伸用法
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Richard Kao
November 04, 2016
Technology
260
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
180
【Swift】在 Protocol extension 內使用 Selector 發生的案例
exp50000
0
120
【Data】我所碰到的 JSON
exp50000
0
57
【iOS】Google Map SDK V.S. MapKit
exp50000
0
110
【iOS】View Hierarchy
exp50000
0
130
【iOS】Auto Layout
exp50000
0
59
【iOS】Clip Subviews
exp50000
0
75
【Swift】 Tutorial Resource
exp50000
0
64
Other Decks in Technology
See All in Technology
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
19k
Software Supply Chain Attackからクラウド環境を守るためにできること
lhazy
2
260
Digitization部 紹介資料
sansan33
PRO
2
7.7k
PLATEAU で バーチャル花火大会
tatsuya1970
0
150
オートロックマンションなのに、各部屋は施錠なし!? 攻撃者が組織内ネットワークで大暴れする理由 / The Front Door Is Locked, but the Rooms Are Wide Open: Why Attackers Move Freely Inside Enterprise Networks
nttcom
1
2.3k
【CEDEC2026】『ウマ娘 プリティーダービー』 英語版のキャラクターの方言や口調をローカライズするための創造的アプローチ
cygames
PRO
2
760
AWS ネットワーク構築でハマった(ハマりかけた) 5選とそこから得た教訓
nagisa53
4
210
サイバー捜査員研修(後半)
nomizone
1
870
え?フロントエンドエンジニアの ワイがインフラも!?
puku0x
1
560
Head First モブプログラミング / Head First Mobprogramming
takaking22
10
12k
『三匹の子ぶた』から学ぶネットワークセキュリティの昔と今 / Network Security: Then and Now Through the Lens of The Three Little Pigs
nttcom
1
2.4k
SO-101×VLAによる3色キューブのピック&プレース
abeja
0
200
Featured
See All Featured
WENDY [Excerpt]
tessaabrams
11
39k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
540
Unsuck your backbone
ammeep
672
58k
Technical Leadership for Architectural Decision Making
baasie
3
470
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
Amusing Abliteration
ianozsvald
1
240
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.3k
Accessibility Awareness
sabderemane
1
170
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
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