Beginning Swift [Book] : Master the fundamentals of programming in Swift 4.
Annotation
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Otros Autores: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Birmingham :
Packt Publishing,
2018.
|
Temas: | |
Acceso en línea: | Texto completo |
Tabla de Contenidos:
- 978-1-78953-431-3-cov
- high res; 978-1-78953-431-3-ebook; Preface; Swift Basics; Swift Program Structure; Hello, World!; Swift Variables and Constants; Declaring Swift Variables; Variables Versus Constants; Type Inference; Variable Naming; Working with Variables; Tuples; Creating a Tuple; Optionals; Declaring an Optional; Working with Optionals; Optional nil Values; Accessing Optional Values; Force Unwrapping an Optional; Conditionally Unwrapping Optionals; The Swift guard Statement; Activity B: Variable Summary; Swift Data Types; Numeric Data Types; Int on 64-Bit Versus 32-Bit Platforms.
- Built-In Numeric Data TypesChoosing the Appropriate Numeric Data Type; Declaring and Assigning Integer Variables; Declaring and Assigning Floating Point Numbers; Numeric Literal Grouping; Numeric Type Conversions; Boolean; Character; Assigning a Character; Constructing a Character Literal; String; Instantiating a String; String Concatenation; Extracting Characters; String Length; Activity C: Data Type Summary; Enums; Basic Enum Syntax; Enum with Raw Values; Activity D: Using Swift Enums; Summary; Swift Operators and Control Flow; Swift Operators; Assignment Operator; Arithmetic Operators.
- Standard Arithmetic OperatorsRemainder Operator; Unary minus Operator; Compound Assignment Operators; Comparison Operators; Equality; Inequality; Comparison between Two Values; Ternary Conditional Operator; Logical Operators; Bitwise Operators; Nil-Coalescing Operator; Range Operators; Closed Range Operator; Half-Open Range Operator; One-Sided Range Operator; Activity A: Operators; Branching; The if Statement; Condition Lists; Optional Unwrapping with if; The switch Statement; switch Statement Rules; The break Keyword; The fallthrough Keyword; Matching Non-Scalar Values.
- Multiple Patterns in a Single CaseUsing the where Statement within case; Evaluating Optionals with a switch Statement; Activity B: Converting Code from if to switch; Loops; The for ... in Statement; Iterating over Objects; Iterating over Array Objects with index; The for Loop where Clause; The break Control Transfer Statement; The continue Control Transfer Statement; The while Loop; The repeat ... while Loop; Activity C: Implementing Loops; Summary; Functions, Classes, and Structs; Functions; Defining a Function; Argument Labels; Excluding Argument Labels; Parameter Default Values.
- Activity A: Implementing a FunctionReturning Values from Functions; Using @discardableResult; Function Attributes; Variadic Parameters; inout Parameters; Recursion; Functions as Parameters; Closures; Creating a Function to Receive Content from an Asynchronous Web Service Call; Error Handling; The do ... catch Statement; Multiple catch Blocks; Using do without catch; The guard Statement; Activity B: Exception Handling; Object-Oriented Features; Object-Oriented Principles; Classes Versus Structs; Defining Classes and Structures; Activity C: Creating a Customer Struct and Class; Summary; Challenge.