Swift Quick Syntax Reference

Matthew Campbell

  • 出版商: Apress
  • 出版日期: 2014-09-21
  • 售價: $1,020
  • 貴賓價: 9.5$969
  • 語言: 英文
  • 頁數: 180
  • 裝訂: Paperback
  • ISBN: 1484204409
  • ISBN-13: 9781484204405
  • 相關分類: Apple Developer
  • 海外代購書籍(需單獨結帳)

相關主題

商品描述

Swift Quick Syntax Reference is a condensed code and syntax reference to the new Apple Swift programming language, which is the alternative new programming language alongside Objective-C behind the APIs found in the Apple iOS SDK 8 and OS X Yosemite SDK. It presents the essential Swift syntax in a well-organized format that can be used as a handy reference.

You won’t find any technical jargon, bloated samples, drawn out history lessons, or witty stories in this book. What you will find is a language reference that is concise, to the point, and highly accessible. The book is packed with useful information and is a must-have for any Swift programmer.

In the Swift Quick Syntax Reference, you will find a concise reference to the Swift language syntax using the new Playgrounds. Playgrounds lets you type a line of code and the result appears immediately.

What you’ll learn

  • How to declare and print constants and variables
  • What are and how to use numbers, strings, booleans, tuples, optionals, aliases, global and local variables, assertions and more
  • How to use assignment, arithmetic, comparison, ternary conditional, range, and logical operators
  • What are enumerations, arrays, dictionaries, loops, if/switch, control transfer, labeled statements
  • How to do closures in Swift
  • How to define or handle structures, classes, instances, class instance identity, properties, property observers, type properties, and type methods
  • How to work with subscripts, inheritance, overriding methods/properties, initialization, type checking/casting, nested types, extensions, delegation, generics and more...

    Who this book is for

    This book is a quick, handy syntax reference for experienced Objective-C, Mac, and iOS programmers, and a concise, easily-digested introduction for other programmers new to Mac, iOS and of course Swift.

    Table of Contents

    1. Hello World

    2. Declaring Constants and Variables

    3. Printing Variables and Constants

    4. Code Comments

    5. Numbers

    6. Strings

    7. Booleans

    8. Tuples

    9. Optionals

    10. Type Aliases

    11. Global and Local Variables

    12. Assertions

    13. Assignment Operators

    14. Arithmetic Operators

    15. Comparison Operators

    16. Ternary Conditional Operator

    17. Range Operators

    18. Logical Operators

    19. Enumeration

    20. Arrays

    21. Dictionaries

    22. Loops

    23. if Statements

    24. switch Statements

    25. Control Transfer Statements

    26. Labeled Statements

    27. Functions

    28. Nested Functions

    29. Closures

    30. Structures

    31. Classes

    32. Using Instances

    33. Class Instance Identity Operators

    34. Properties

    35. Property Observers

    36. Class Type Properties

    37. Type Methods

    38. Subscripts

    39. Inheritance

    40. Overriding Methods and Properties

    41. Initialization

    42. De-initialization

    43. Type Casting

    44. Nested Types

    45. Extensions

    46. Protocols

    47. Delegation

    48. Generics

    49. Automatic Reference Counting

    商品描述(中文翻譯)

    《Swift快速語法參考》是一本簡潔的代碼和語法參考書,介紹了蘋果新的Swift編程語言。Swift是蘋果iOS SDK 8和OS X Yosemite SDK中的一個新的替代編程語言,用於開發蘋果的API。本書以井然有序的格式呈現了Swift的基本語法,可作為方便的參考工具。

    本書不含任何技術術語、冗長的示例、冗長的歷史課程或風趣的故事。你將找到一本簡潔、直接、易於理解的語言參考書。本書充滿了有用的信息,是任何Swift程序員必備的工具。

    在《Swift快速語法參考》中,你將找到使用新的Playgrounds的簡潔的Swift語言語法參考。Playgrounds允許你輸入一行代碼,結果立即顯示。

    你將學到以下內容:
    - 如何聲明和打印常量和變量
    - 什麼是數字、字符串、布爾值、元組、可選值、別名、全局和局部變量、斷言等,以及如何使用它們
    - 如何使用賦值、算術、比較、三元條件、範圍和邏輯運算符
    - 什麼是枚舉、數組、字典、循環、if/switch語句、控制轉移、標籤語句
    - 如何在Swift中使用閉包
    - 如何定義或處理結構、類、實例、類實例身份、屬性、屬性觀察器、類型屬性和類型方法
    - 如何使用下標、繼承、重寫方法/屬性、初始化、類型檢查/轉換、嵌套類型、擴展、委託、泛型等等...

    本書適合有經驗的Objective-C、Mac和iOS程序員作為快速參考,也適合其他新手程序員作為簡潔易懂的入門指南。

    目錄:
    1. Hello World
    2. 常量和變量的聲明
    3. 打印變量和常量
    4. 代碼註釋
    5. 數字
    6. 字符串
    7. 布爾值
    8. 元組
    9. 可選值
    10. 別名
    11. 全局和局部變量
    12. 斷言
    13. 賦值運算符
    14. 算術運算符
    15. 比較運算符
    16. 三元條件運算符
    17. 範圍運算符
    18. 邏輯運算符
    19. 枚舉
    20. 數組
    21. 字典
    22. 循環
    23. if語句
    24. switch語句
    25. 控制轉移語句
    26. 標籤語句
    27. 函數
    28. 嵌套函數
    29. 閉包
    30. 結構
    31. 類
    32. 使用實例
    33. 類實例身份運算符
    34. 屬性
    35. 屬性觀察器
    36. 類型屬性
    37. 類型方法
    38. 下標
    39. 繼承
    40. 重寫方法和屬性
    41. 初始化
    42. 反初始化
    43. 類型轉換
    44. 嵌套類型
    45. 擴展
    46. 協議
    47. 委託
    48. 泛型
    49. 自動引用計數