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
Richard Kao
November 04, 2016
Technology
260
0
Share
【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
54
【iOS】Google Map SDK V.S. MapKit
exp50000
0
100
【iOS】View Hierarchy
exp50000
0
120
【iOS】Auto Layout
exp50000
0
52
【iOS】Clip Subviews
exp50000
0
70
【Swift】 Tutorial Resource
exp50000
0
61
Other Decks in Technology
See All in Technology
拝啓、あの夏の僕へ〜あなたも知っているApp Runnerの世界〜
news_it_enj
0
180
AIはハッカーを減らすのか、増やすのか?──現役ホワイトハッカーから見るAI時代のリアル【MEGU-Meet】
cscengineer
PRO
0
260
Anthropic「Long-running a gents」をGeminiで再現してみた
tkikuchi
0
760
20260423_ハドソンのエロゲを追え_レトロゲーム
poropinai1966
0
100
MySQL 9.7がやってきた ~これまでのあらすじと基本情報~ @ 日本MySQLユーザ会会2026年04月 / mysql97-yattekita
sakaik
0
160
The 7 pitfalls of AI
ufried
0
170
Digital Independence: Why, When and How
wannesrams
0
240
Cortex Codeのコスト見積ヒントご紹介
yokatsuki
0
140
M5Stack CoreS3とZephyr(RTOS)で Edge AIっぽいことしてみた
iotengineer22
0
410
No Types Needed, Just Callable Method Check
dak2
1
2.8k
「QA=テスト」「シフトレフト=スクラムイベントの参加者の一員」の呪縛を解く。アジャイルな開発を止めないために、10Xで挑んだ「右側のしわ寄せ」解消記 #scrumniigata
nihonbuson
PRO
3
420
Keeping Ruby Running on Cygwin
fd0
0
200
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
180
WCS-LA-2024
lcolladotor
0
560
Thoughts on Productivity
jonyablonski
76
5.1k
Amusing Abliteration
ianozsvald
1
160
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Typedesign – Prime Four
hannesfritz
42
3k
Designing for humans not robots
tammielis
254
26k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
280
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
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