3 options
Beginning Swift : master the fundamentals of programming in Swift 4. / Rob Kerr, Kare Morstol.
- Format:
- Book
- Author/Creator:
- Kerr, Robert, author.
- Morstol, Kare, author.
- Language:
- English
- Subjects (All):
- iOS (Electronic resource).
- Swift (Computer program language).
- Mobile computing--Programming.
- Mobile computing.
- Physical Description:
- 1 online resource (1 volume) : illustrations
- Edition:
- 1st edition
- Other Title:
- Master the fundamentals of programming in Swift 4
- Place of Publication:
- Birmingham ; Mumbai : Packt, 2018.
- System Details:
- text file
- Biography/History:
- Kerr Rob: Rob Kerr is a mobile software strategist, designer, and developer, with over 20 years of software development experience. He has been developing iOS applications using Swift since the language's introduction. Rob is the founder of Mobile Toolworks, a software development consultancy creating innovative software designed for a mobile-first world. Morstl Kare: Kre Morstl is an independent software developer from Norway, who has programmed almost exclusively in Swift since it was announced. He has created and contributed to numerous open source projects, mainly focused on command-line applications. He thinks Swift is a great language that just keeps getting better.
- Summary:
- Master the fundamentals of programming in Swift 4 About This Book Covers theory and practice in equal parts Teaches you how to correctly structure and architect software using Swift Uses real-world examples to connect the theory to a professional setting Imparts expertise in the core Swift standard library Who This Book Is For If 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. What You Will Learn Explore the fundamental Swift programming concepts, language structure, and the Swift programming syntax Learn how Swift compares to other computer languages and how to transform your thinking to leverage new concepts such as optionals and protocols Master how to use key language elements, such as strings and collections Grasp how Swift supports modern application development using advanced features, such as built-in Unicode support and higher-order functions. In Detail Take 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. This course helps you develop client-side and server-side applications, as well as web services using Swift. We'll begin with exploring the fundamental Swift programming concepts, language structure, and the Swift programming syntax. Then, we'll learn to create original custom operators with Swift operators, branching, and loops. Moving on, we'll learn how to run application codes and compile errors. Having made progress with it, we'll see how Swift compares to other computer languages and how to transform your thinking. Then, master the usage of key language elements, such as strings and collections. Finally, grasp how Swift supports modern application development using advanced features, such as built-in Unicode support and higher-order functions. This is an introductory course to the Swift programming language with Xcode.After completing this course, students will be well-prepared to begin developing native end-user applications for iOS or macOS, or to develop server-side (back-end) application and web servi...
- Contents:
- Intro
- 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: Variable Summary
- Swift Data Types
- Numeric Data Types
- Int on 64-Bit Versus 32-Bit Platforms
- Built-In Numeric Data Types
- Choosing 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: Data Type Summary
- Enums
- Basic Enum Syntax
- Enum with Raw Values
- Activity: Using Swift Enums
- Summary
- Swift Operators and Control Flow
- Swift Operators
- Assignment Operator
- Arithmetic Operators
- Standard Arithmetic Operators
- Remainder 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: 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 Case
- Using the where Statement within case
- Evaluating Optionals with a switch Statement
- Activity: 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: Implementing Loops
- Functions, Classes, and Structs
- Functions
- Defining a Function
- Argument Labels
- Excluding Argument Labels
- Parameter Default Values
- Activity: Implementing a Function
- Returning 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: Exception Handling
- Object-Oriented Features
- Object-Oriented Principles
- Classes Versus Structs
- Defining Classes and Structures
- Activity: Creating a Customer Struct and Class
- Challenge
- Collections
- Arrays
- Working with Arrays
- Index
- Common Operations with Index
- ArraySlice
- Creating Slices
- Activity: Working with Arrays
- Sets
- Working with Sets
- Combining Sets
- Comparing Sets
- Activity: Removing Duplicates from a Sequence
- Dictionaries
- Working with Dictionaries
- Activity: Using Dictionaries
- Strings
- String Fundamentals
- Collection
- Working with String Index
- Debugging
- Activity: All Indices of a Character
- Using Strings
- Creating Strings
- Common Operations
- Activity: All Ranges of a Substring.
- Activity: Counting Words, Sentences, and Paragraphs
- Substring
- Creating Substrings
- Parsing Strings
- Converting NSRange to Range
- Activity: CamelCase
- Functional Programming and Lazy Operations
- Function Type
- Functional Methods
- filter
- Using the filter Method
- map
- Using the map Method
- flatMap
- Using the flatMap Method
- reduce
- Using the reduce Function
- Activity: Using Functional Programming
- Lazy Operations
- Lazy Sequences
- Sequence Internals
- Creating Lazy Operations
- sequence(first:next:)
- sequence(state:next:)
- Activity: Implementing a Lazy Version of a Method
- Swifty Code
- Naming
- Organizing Code
- Miscellaneous
- Writing Swifty Code
- Further Study
- Index.
- Notes:
- Includes index.
- Description based on print version record.
- ISBN:
- 9781789538649
- 1789538645
- OCLC:
- 1042168494
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.