Beginning Swift Programming.

By: Lee, Wei-MingMaterial type: TextTextSeries: eBooks on DemandPublisher: Somerset : John Wiley & Sons, Incorporated, 2014Copyright date: ©2015Edition: 1st edDescription: 1 online resource (290 pages)Content type: text Media type: computer Carrier type: online resourceISBN: 9781119009320Subject(s): Application software -- Development.;iOS (Electronic resource).;Programming languages (Electronic computers)Genre/Form: Electronic books.Additional physical formats: Print version:: Beginning Swift ProgrammingDDC classification: 005.13 LOC classification: QA76.7Online resources: Click here to view this ebook.
Contents:
Intro -- Beginning Swift™ Programming -- ABOUT THE AUTHOR -- ABOUT THE TECHNICAL EDITOR -- CREDITS -- ACKNOWLEDGMENTS -- CONTENTS -- INTRODUCTION -- CHAPTER 1: INTRODUCTION TO SWIFT -- What Is Swift? -- Why Swift Is Important -- Setting Up the Environment -- Creating a Playground Project -- Creating an iOS Project -- Swift Syntax -- Constants -- Variables -- String Interpolation: Including Values in Strings -- Statements -- Printing -- Comments -- Summary -- CHAPTER 2: DATA TYPES -- Basic Data Types -- Integers -- Types of Integers -- Integer Operations -- Integer Literals -- Floating-Point Numbers -- Floating-Point Operations -- Floating-Point Literals -- Type Alias -- Boolean -- Tuples -- Optional Types -- Implicitly Unwrapped Optionals -- Optional Binding -- Unwrapping Optionals Using "?" -- Enumerations -- Using Enumeration in Switch Statements -- Enumeration Raw Values -- Auto-Increment for Raw Values -- Associated Values -- Enumeration Functions -- Summary -- CHAPTER 3: STRINGS AND CHARACTERS -- Strings -- Mutability of Strings -- Strings as Value Types -- Characters -- Concatenating Strings -- Special Characters -- Unicode -- Common String Functions -- Equality -- Prefix and Suffix -- Length -- Substrings -- Converting Strings to Arrays -- Type Conversion -- Interoperability with NSString -- Casting String to NSString -- Using NSString Directly -- String or NSString? -- Summary -- CHAPTER 4: BASIC OPERATORS -- Assignment Operator -- Arithmetic Operators -- Addition Operator -- Subtraction Operator -- Multiplication Operator -- Division Operator -- Modulus Operator -- Increment and Decrement Operator -- Compound Assignment Operators -- Nil Coalescing Operator -- Comparison Operators -- Equal To and Not Equal To -- Greater Than or Equal To -- Less Than or Equal To -- Range Operators -- Logical Operators -- NOT -- AND -- OR.
Combining Logical Operators -- Ternary Conditional Operator -- Summary -- CHAPTER 5: FUNCTIONS -- Defi ning and Calling a Function -- Input Parameters -- Returning a Value -- Returning Multiple Values -- Function Parameter Names -- External Parameter Names Shorthand -- Default Parameter Values -- Variadic (Variable) Parameters -- Constant and Variable Parameters -- In-Out Parameters -- Function Types -- Defining a Function Type Variable -- Calling a Function Type Variable -- Returning Function Type in a Function -- Nested Functions -- Summary -- CHAPTER 6: COLLECTIONS -- Arrays -- Mutability of Arrays -- Array Data Types -- Retrieving Elements from an Array -- Inserting Elements into an Array -- Modifying Elements in an Array -- Appending Elements to an Array -- Checking the Size of an Array -- Removing Elements from an Array -- Iterating over an Array -- Creating an Empty Array -- Testing Arrays for Equality -- Dictionaries -- Mutability of Dictionaries -- Retrieving Elements from a Dictionary -- Checking the Size of a Dictionary -- Modifying an Item in the Dictionary -- Removing an Item from the Dictionary -- Iterating over a Dictionary -- Creating an Empty Dictionary -- Testing Dictionaries for Equality -- Copying the Behavior of Arrays and Dictionaries -- Summary -- CHAPTER 7: CONTROL FLOW AND LOOPING -- Flow Control -- If Statement -- If-Else Statement -- Switch Statement -- Matching Numbers -- Matching Characters -- Fallthrough -- Matching a Range of Numbers -- Matching Tuples -- Value Bindings -- Where Clause -- Looping -- For-In Loop -- Traditional For Loop -- While Loop -- Do-While Loop -- Control Transfer Statements -- Break Statement -- Continue Statement -- Labeled Statement -- Summary -- CHAPTER 8: STRUCTURES AND CLASSES -- Structures -- Memberwise Initializers -- Structures as Value Types -- Comparing Structures -- Classes.
Defining a Class -- Properties -- Stored Properties -- Lazy Stored Properties -- Computed Properties -- Motivation Behind Computed Properties -- The newValue keyword -- Read-Only Computed Properties -- Property Observers -- Typed Properties -- Initializers -- Initializers and External Parameter Names -- Initializing Variables and Constants During Initialization -- Classes as Reference Types -- Comparing Instances-Identity Operators -- Comparing Instances-Equivalence Operators -- Methods in Classes -- Instance Methods -- Local and External Parameter Names for Methods -- The self Property -- Type Methods -- Methods in Structures -- Summary -- CHAPTER 9: INHERITANCE -- Understanding Inheritance -- Defining a Base Class -- Instantiating a Base Class -- Creating an Abstract Class -- Inheriting from a Base Class -- Overriding Initializers -- Overloading Initializers -- Creating Abstract Methods -- Overloading Methods -- Preventing Subclassing -- Types of Initializers -- Default Initializer -- Designated Initializers -- Convenience Initializers and Initializer Chaining -- Calling Initializers in Subclasses -- Extensions -- Extending Methods -- Extending Properties -- Access Controls -- Internal -- Private -- Public -- Summary -- CHAPTER 10: CLOSURES -- Understanding Closures -- Functions as Closures -- Assigning Closures to Variables -- Writing Closures Inline -- Type Inference -- Shorthand Argument Names -- Operator Function -- Trailing Closures -- Using the Array's Three Closure Functions -- The map Function -- Example 1 -- Example 2 -- The filter Function -- Example 1 -- Example 2 -- The reduce Function -- Example 1 -- Example 2 -- Using Closures in Your Functions -- Summary -- CHAPTER 11: PROTOCOLS AND DELEGATES -- Understanding Protocols -- Defining and Using a Protocol -- Conforming to a Protocol -- Optional Methods -- Conforming to Multiple Protocols.
Property Requirements -- Initializer Requirements -- Understanding Delegates -- Delegates as Event Handlers -- A Practical Example of Protocols and Delegates -- Summary -- CHAPTER 12: GENERICS -- Understanding Generics -- Using Generic Functions -- Multiple Type Parameters -- Specifying Type Constraint -- Generic Types -- Generic Classes -- Generic Structures -- Generic Type Extension -- Using Generics in Protocols -- Specifying Requirements for Associated Types -- Summary -- APPENDIX: EXERCISE ANSWERS -- INDEX -- ADVERT -- EULA.
Summary: Enter the Swift future of iOS and OS X programming Beginning Swift Programming is your ideal starting point for creating Mac, iPhone, and iPad apps using Apple's new Swift programming language. Written by an experienced Apple developer and trainer, this comprehensive guide explains everything you need to know to jumpstart the creation of your app idea. Coverage includes data types, strings and characters, operators and functions, arrays and dictionaries, control flow, and looping, with expert guidance on classes, objects, class inheritance, closures, protocols, and generics. This succinct - yet complete - overview provides a detailed introduction to the core features of Swift. Apple developed Swift to address the limitations of Objective-C, and add features found in more complex languages like Python. The results is simpler, cleaner, more expressive code with automatic memory management, functional programming patterns, and more, including built-in features that make Swift apps faster, scalable, and more secure. This book explains it all, helping developers master Apple's new language. Become fluent with syntax that's easier to read and maintain Understand inferred types for cleaner, less mistake-prone code Learn the key features that make Swift more expressive than Objective-C Learn the new optional types in Swift that make your code more resilient Understand the key design patterns in iOS and Mac OS programming using protocols and delegates Learn how to use generics to create highly reusable code Learn the new access controls mechanism in Swift Get up to speed quickly to remain relevant and ahead of the curve.
Tags from this library: No tags from this library for this title. Log in to add tags.
Item type Current location Call number URL Status Date due Barcode
Electronic Book UT Tyler Online
Online
QA76.7 (Browse shelf) https://ebookcentral.proquest.com/lib/uttyler/detail.action?docID=1882241 Available EBC1882241

Intro -- Beginning Swift™ Programming -- ABOUT THE AUTHOR -- ABOUT THE TECHNICAL EDITOR -- CREDITS -- ACKNOWLEDGMENTS -- CONTENTS -- INTRODUCTION -- CHAPTER 1: INTRODUCTION TO SWIFT -- What Is Swift? -- Why Swift Is Important -- Setting Up the Environment -- Creating a Playground Project -- Creating an iOS Project -- Swift Syntax -- Constants -- Variables -- String Interpolation: Including Values in Strings -- Statements -- Printing -- Comments -- Summary -- CHAPTER 2: DATA TYPES -- Basic Data Types -- Integers -- Types of Integers -- Integer Operations -- Integer Literals -- Floating-Point Numbers -- Floating-Point Operations -- Floating-Point Literals -- Type Alias -- Boolean -- Tuples -- Optional Types -- Implicitly Unwrapped Optionals -- Optional Binding -- Unwrapping Optionals Using "?" -- Enumerations -- Using Enumeration in Switch Statements -- Enumeration Raw Values -- Auto-Increment for Raw Values -- Associated Values -- Enumeration Functions -- Summary -- CHAPTER 3: STRINGS AND CHARACTERS -- Strings -- Mutability of Strings -- Strings as Value Types -- Characters -- Concatenating Strings -- Special Characters -- Unicode -- Common String Functions -- Equality -- Prefix and Suffix -- Length -- Substrings -- Converting Strings to Arrays -- Type Conversion -- Interoperability with NSString -- Casting String to NSString -- Using NSString Directly -- String or NSString? -- Summary -- CHAPTER 4: BASIC OPERATORS -- Assignment Operator -- Arithmetic Operators -- Addition Operator -- Subtraction Operator -- Multiplication Operator -- Division Operator -- Modulus Operator -- Increment and Decrement Operator -- Compound Assignment Operators -- Nil Coalescing Operator -- Comparison Operators -- Equal To and Not Equal To -- Greater Than or Equal To -- Less Than or Equal To -- Range Operators -- Logical Operators -- NOT -- AND -- OR.

Combining Logical Operators -- Ternary Conditional Operator -- Summary -- CHAPTER 5: FUNCTIONS -- Defi ning and Calling a Function -- Input Parameters -- Returning a Value -- Returning Multiple Values -- Function Parameter Names -- External Parameter Names Shorthand -- Default Parameter Values -- Variadic (Variable) Parameters -- Constant and Variable Parameters -- In-Out Parameters -- Function Types -- Defining a Function Type Variable -- Calling a Function Type Variable -- Returning Function Type in a Function -- Nested Functions -- Summary -- CHAPTER 6: COLLECTIONS -- Arrays -- Mutability of Arrays -- Array Data Types -- Retrieving Elements from an Array -- Inserting Elements into an Array -- Modifying Elements in an Array -- Appending Elements to an Array -- Checking the Size of an Array -- Removing Elements from an Array -- Iterating over an Array -- Creating an Empty Array -- Testing Arrays for Equality -- Dictionaries -- Mutability of Dictionaries -- Retrieving Elements from a Dictionary -- Checking the Size of a Dictionary -- Modifying an Item in the Dictionary -- Removing an Item from the Dictionary -- Iterating over a Dictionary -- Creating an Empty Dictionary -- Testing Dictionaries for Equality -- Copying the Behavior of Arrays and Dictionaries -- Summary -- CHAPTER 7: CONTROL FLOW AND LOOPING -- Flow Control -- If Statement -- If-Else Statement -- Switch Statement -- Matching Numbers -- Matching Characters -- Fallthrough -- Matching a Range of Numbers -- Matching Tuples -- Value Bindings -- Where Clause -- Looping -- For-In Loop -- Traditional For Loop -- While Loop -- Do-While Loop -- Control Transfer Statements -- Break Statement -- Continue Statement -- Labeled Statement -- Summary -- CHAPTER 8: STRUCTURES AND CLASSES -- Structures -- Memberwise Initializers -- Structures as Value Types -- Comparing Structures -- Classes.

Defining a Class -- Properties -- Stored Properties -- Lazy Stored Properties -- Computed Properties -- Motivation Behind Computed Properties -- The newValue keyword -- Read-Only Computed Properties -- Property Observers -- Typed Properties -- Initializers -- Initializers and External Parameter Names -- Initializing Variables and Constants During Initialization -- Classes as Reference Types -- Comparing Instances-Identity Operators -- Comparing Instances-Equivalence Operators -- Methods in Classes -- Instance Methods -- Local and External Parameter Names for Methods -- The self Property -- Type Methods -- Methods in Structures -- Summary -- CHAPTER 9: INHERITANCE -- Understanding Inheritance -- Defining a Base Class -- Instantiating a Base Class -- Creating an Abstract Class -- Inheriting from a Base Class -- Overriding Initializers -- Overloading Initializers -- Creating Abstract Methods -- Overloading Methods -- Preventing Subclassing -- Types of Initializers -- Default Initializer -- Designated Initializers -- Convenience Initializers and Initializer Chaining -- Calling Initializers in Subclasses -- Extensions -- Extending Methods -- Extending Properties -- Access Controls -- Internal -- Private -- Public -- Summary -- CHAPTER 10: CLOSURES -- Understanding Closures -- Functions as Closures -- Assigning Closures to Variables -- Writing Closures Inline -- Type Inference -- Shorthand Argument Names -- Operator Function -- Trailing Closures -- Using the Array's Three Closure Functions -- The map Function -- Example 1 -- Example 2 -- The filter Function -- Example 1 -- Example 2 -- The reduce Function -- Example 1 -- Example 2 -- Using Closures in Your Functions -- Summary -- CHAPTER 11: PROTOCOLS AND DELEGATES -- Understanding Protocols -- Defining and Using a Protocol -- Conforming to a Protocol -- Optional Methods -- Conforming to Multiple Protocols.

Property Requirements -- Initializer Requirements -- Understanding Delegates -- Delegates as Event Handlers -- A Practical Example of Protocols and Delegates -- Summary -- CHAPTER 12: GENERICS -- Understanding Generics -- Using Generic Functions -- Multiple Type Parameters -- Specifying Type Constraint -- Generic Types -- Generic Classes -- Generic Structures -- Generic Type Extension -- Using Generics in Protocols -- Specifying Requirements for Associated Types -- Summary -- APPENDIX: EXERCISE ANSWERS -- INDEX -- ADVERT -- EULA.

Enter the Swift future of iOS and OS X programming Beginning Swift Programming is your ideal starting point for creating Mac, iPhone, and iPad apps using Apple's new Swift programming language. Written by an experienced Apple developer and trainer, this comprehensive guide explains everything you need to know to jumpstart the creation of your app idea. Coverage includes data types, strings and characters, operators and functions, arrays and dictionaries, control flow, and looping, with expert guidance on classes, objects, class inheritance, closures, protocols, and generics. This succinct - yet complete - overview provides a detailed introduction to the core features of Swift. Apple developed Swift to address the limitations of Objective-C, and add features found in more complex languages like Python. The results is simpler, cleaner, more expressive code with automatic memory management, functional programming patterns, and more, including built-in features that make Swift apps faster, scalable, and more secure. This book explains it all, helping developers master Apple's new language. Become fluent with syntax that's easier to read and maintain Understand inferred types for cleaner, less mistake-prone code Learn the key features that make Swift more expressive than Objective-C Learn the new optional types in Swift that make your code more resilient Understand the key design patterns in iOS and Mac OS programming using protocols and delegates Learn how to use generics to create highly reusable code Learn the new access controls mechanism in Swift Get up to speed quickly to remain relevant and ahead of the curve.

Description based on publisher supplied metadata and other sources.

Author notes provided by Syndetics

Wei-Meng Lee is a technologist and founder of Developer Learning Solutions (www.learn2develop.net), a technology company specializing in hands-on training on the latest mobile technologies. He is an established developer and trainer specializing in .NET, iOS, and Android.

Wei-Meng speaks regularly at international conferences and has authored and co-authored numerous books on .NET, XML, and mobile technologies. He writes extensively for the O'Reilly Network and Mobiforge.com on topics ranging from .NET to Mac OS X. He is also the author of Beginning iOS 5 Application Development and Beginning Android 4 Application Development , both from Wrox.

There are no comments on this title.

to post a comment.