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】Protocol 命名 - Convertible
Search
Richard Kao
October 21, 2016
Technology
190
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
【Swift】Protocol 命名 - Convertible
當我們把 protocol 命名為 ”某某Convertible“ 代表了什麼?
是誰轉換成誰?
什麼轉換成什麼?
怎麼應用,來看看
#實習 #公司分享會 #Swift
Richard Kao
October 21, 2016
More Decks by Richard Kao
See All by Richard Kao
【Swift】Extension 的延伸用法
exp50000
0
260
【Swift】在 Protocol extension 內使用 Selector 發生的案例
exp50000
0
120
【Data】我所碰到的 JSON
exp50000
0
61
【iOS】Google Map SDK V.S. MapKit
exp50000
0
110
【iOS】View Hierarchy
exp50000
0
130
【iOS】Auto Layout
exp50000
0
60
【iOS】Clip Subviews
exp50000
0
75
【Swift】 Tutorial Resource
exp50000
0
64
Other Decks in Technology
See All in Technology
コスト最適化の「めんどくさい」を AWS FinOps Agent でチョット楽にする
classmethod_kaz
0
240
データエンジニアの困りごとをDevinと一緒に解消する
10xinc
2
840
Azure Cost Management の FOCUS コストデータを迷わず読むための“3つの軸”
tetsuyaooooo
0
150
[DroidKaigi 2026] Making UI specifications visible: Android UI development in the AI agent era supported by Compose Screenshot Testing and galleries
syarihu
0
580
リージョンの壁を越える、 ちょっと変わったAWSサービスの話
falken
PRO
0
260
Microsoft 365 Copilot chat -tekoälypalvelun tietosuojaongelmat
hponka
0
430
【Oracle AI Spotlight ウェビナー】AWSか、Azureか、Google Cloudか。その議論にオラクルを含める意義。
oracle4engineer
PRO
2
240
AndroidでHDRメディアを「壊さずに」扱う
chigichan24
0
410
bet_ai_day_2026_session02
agenticsec
1
1.2k
Benchmarking Vector Databases: pgvector vs. LanceDB
tsho
0
140
ペアプロの価値はコードを書くことだけじゃない
codmoninc
PRO
0
110
Multica × 長期記憶:40個のミニプロジェクト管理
eiei114
0
130
Featured
See All Featured
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
From π to Pie charts
rasagy
0
350
HDC tutorial
michielstock
2
850
Leo the Paperboy
mayatellez
8
2.2k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
460
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Agile that works and the tools we love
rasmusluckow
331
22k
GraphQLとの向き合い方2022年版
quramy
50
15k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
The agentic SEO stack - context over prompts
schlessera
0
900
Transcript
Convertible
protocol SomeTypeConver t i b l e ‘ Can Be
’
Subject? Object? SomeType can be converted to object Subject can
be converted to SomeType 誰 主 詞 ︖ 誰 受 詞 ︖
Ⰽ罏涼〳腋
• NilLiteralConvertible • BooleanLiteralConvertible • IntegerLiteralConvertible • FloatLiteralConvertible • StringLiteralConvertible
• UnicodeScalarLiteralConvertible • ExtendedGraphemeClusterLiteralConvertible Ex.
protocol IntegerLiteralConvertible { associatedtype IntegerLiteralType init(integerLiteralValue value: Self.IntegerLiteralType) }
Comfort to 以上 Convertible 的型別 可以把 SomeType 轉換成 ᛔ૩ጱࣳ獨
DeMo 程式範例
Ex. Alamofire R o u t e r • URLStringConvertible
• URLRequestConvertible
public protocol URLRequestConvertible { /// The URL request. var URLRequest:
NSMutableURLRequest { get } }
Comfort to 以上 Convertible 的型別 可以把 ᛔ૩ጱࣳ獨 轉換成 SomeType
DeMo 程式範例