- iOS Programming Cookbook
- Hossam Ghareeb
- 91字
- 2021-07-09 18:29:40
Getting ready
The syntax of protocol goes like this:
protocol ProtocolName{ // List of properties and methods goes here.... }
The keyword protocol followed by the protocol name and curly braces are the building blocks of any protocol you need to write. Classes, structures, or enumeration can then conform to it like this:
class SampleClass: ProtocolName{ }
After class name, you type colon and the super class name that this class extend from if any, followed by a list of protocols that you want to conform to with a comma separation.
推薦閱讀
- Citrix XenApp Performance Essentials
- Mastering vRealize Operations Manager(Second Edition)
- 零起點(diǎn)學(xué)Linux系統(tǒng)管理
- Linux系統(tǒng)安全基礎(chǔ):二進(jìn)制代碼安全性分析基礎(chǔ)與實(shí)踐
- Ceph分布式存儲實(shí)戰(zhàn)
- ElasticSearch Cookbook
- Linux基礎(chǔ)使用與案例
- CentOS 6 Linux Server Cookbook
- Introduction to R for Quantitative Finance
- Heroku Cloud Application Development
- 大規(guī)模分布式系統(tǒng)架構(gòu)與設(shè)計(jì)實(shí)戰(zhàn)
- Docker容器技術(shù)與應(yīng)用
- Linux從入門到精通(視頻教學(xué)版)
- Website Development with PyroCMS
- Windows 8玩全不求人