Swift Pocket Reference: Programming for iOS and OS X, 2/e (Paperback)

Anthony Gray

  • 出版商: O'Reilly
  • 出版日期: 2015-12-05
  • 定價: $525
  • 售價: 9.5$499
  • 語言: 英文
  • 頁數: 236
  • 裝訂: Paperback
  • ISBN: 1491940077
  • ISBN-13: 9781491940075
  • 相關分類: Apple Developer
  • 立即出貨(限量) (庫存=1)

買這商品的人也買了...

商品描述

Get quick answers for developing and debugging applications with Swift, Apple’s multi-paradigm programming language. Updated to cover the latest features in Swift 2.0, this pocket reference is the perfect on-the-job tool for learning Swift’s modern language features, including type safety, generics, type inference, closures, tuples, automatic memory management, and support for Unicode.

Designed to work with Cocoa and Cocoa Touch, Swift can be used in tandem with Objective-C, and either language can call APIs implemented in the other. Swift is still evolving, but Apple clearly sees it as the future language of choice for iOS and OS X software development.

Topics include:

  • Supported data types, such as strings, arrays, array slices, sets, and dictionaries
  • Program flow: loops, conditional execution, and error handling
  • Classes, structures, enumerations, and functions
  • Protocols, extensions, and generics
  • Memory management
  • Closures: similar to blocks in Objective-C and lambdas in C#
  • Optionals: values that can explicitly have no value
  • Operators, operator overloading, and custom operators
  • Access control: restricting access to types, methods, and properties
  • Ranges, intervals, and strides
  • A full list of built-in global functions and their parameter requirements

商品描述(中文翻譯)

快速獲得開發和調試使用 Swift 的應用程式的解答,Swift 是蘋果的多範式程式語言。此口袋參考書已更新至 Swift 2.0 的最新功能,是學習 Swift 現代語言特性的完美工具,包括型別安全、泛型、型別推斷、閉包、元組、自動記憶體管理和對 Unicode 的支援。

Swift 設計用於與 Cocoa 和 Cocoa Touch 一起使用,可以與 Objective-C 並行使用,兩種語言都可以呼叫對方實現的 API。Swift 仍在不斷演進,但蘋果明顯將其視為 iOS 和 OS X 軟體開發的未來語言選擇。

主題包括:
- 支援的資料型別,如字串、陣列、陣列切片、集合和字典
- 程式流程:迴圈、條件執行和錯誤處理
- 類別、結構、列舉和函式
- 協定、擴展和泛型
- 記憶體管理
- 閉包:類似於 Objective-C 的 blocks 和 C# 的 lambdas
- 可選型別:可以明確表示沒有值的值
- 運算子、運算子重載和自訂運算子
- 存取控制:限制對型別、方法和屬性的存取
- 範圍、間隔和步進
- 內建全域函式的完整清單及其參數要求