- iOS Programming Cookbook
- Hossam Ghareeb
- 104字
- 2021-07-09 18:29:38
Creating enumerations to write readable code
Using enumerations is one of the best practices that you should follow while writing any software project and not only iOS projects. Once you find that you have a group of related values in your project, create enum to group these values and to define a safe type for these values. With enumerations, your code becomes more readable and easy to understand, as it makes you define new types in your project that map to other value. In Swift, enumerations have been taken care of and have become more flexible than the ones used in other programming languages.
推薦閱讀
- Linux設(shè)備驅(qū)動開發(fā)詳解:基于最新的Linux4.0內(nèi)核
- 構(gòu)建高可用Linux服務(wù)器(第4版)
- Linux操作系統(tǒng)基礎(chǔ)
- Puppet實戰(zhàn)
- UNIX操作系統(tǒng)設(shè)計
- FreeRTOS實時內(nèi)核應(yīng)用指南
- Kali Linux滲透測試全流程詳解
- 精通Linux內(nèi)核開發(fā)
- Python基礎(chǔ)教程(第3版)
- 竹林蹊徑:深入淺出windows驅(qū)動開發(fā)
- Joomla! 3 Template Essentials
- Windows 7應(yīng)用入門與技巧
- 云原生落地:產(chǎn)品、架構(gòu)與商業(yè)模式
- Office 365 User Guide
- Windows網(wǎng)絡(luò)編程(第2版)