Limit search to available items
Book Cover
E-book
Author Morstøl, Kåre

Title Beginning Swift [Book] : Master the fundamentals of programming in Swift 4
Published Birmingham : Packt Publishing, 2018

Copies

Description 1 online resource (196 pages)
Contents 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
Summary Annotation Swift greatly simplifies the process of developing applications for Apple devices. This course helps you develop client-side and server-side applications, as well as web services using Swift. Key FeaturesTeaches you how to correctly structure and architect software using SwiftUses real-world examples to connect the theory to a professional settingImparts expertise in the core Swift standard libraryBook DescriptionTake your first foray into programming for Apple devices with Swift. Swift is fundamentally different from Objective-C, as it is a protocol-oriented language. While you can still write normal object-oriented code in Swift, it requires a new way of thinking to take advantage of its powerful features and a solid understanding of the basics to become productive. What you will learnExplore the fundamental Swift programming concepts, language structure, and the Swift programming syntaxLearn how Swift compares to other computer languages and how to transform your thinking to leverage new concepts such as optionals and protocolsMaster how to use key language elements, such as strings and collectionsGrasp how Swift supports modern application development using advanced features, such as built-in Unicode support and higher-order functionsWho this book is forIf you are seeking fundamental Swift programming skills, in preparation for learning to develop native applications for iOS or macOS, this book is the best for you. You don't need to have any prior Swift knowledge; however, object-oriented programming experience is desired
Notes Collections
NA
Print version record
Subject Swift
Mobile computing -- Programming
Information technology: general issues.
Computer science.
Computer programming -- software development.
Computers -- General.
Computers -- Computer Science.
Computers -- Programming -- General.
Form Electronic book
Author Kerr, Robert
ISBN 9781789538649
1789538645
9781789534313
1789534313