
Install Xcode 7.x and Swift, download the stable release, and run a hello world in a Swift playground to learn project setup and console output.
Navigate the Xcode interface by starting a new Swift iOS single-view project, then explore the file, symbol, find, issue, test, debug, breakpoint, and report navigators.
Navigate the right inspector panel in Xcode to view file identity, location, and type, using templates, snippets, objects, and media tabs.
Explore the Xcode editor and interface, focusing on the source code editor, interface builder, and storyboard editor; navigate files, use the versioning inspector, and work with the debug window.
Create a simple hello world app for iPhone using Xcode and storyboard, guided by MVC, interface builder, and a single button.
Learn to wire a button to an ib action in xcode by creating an action method, linking it in three ways, and printing 'Hello world' to the output window.
Build a simple hello world app by wiring a button to an action that updates a UI label via an outlet, demonstrating Swift optionals, weak references, and interface builder basics.
Explore variables and constants in Swift using a playground, learn the difference between var and let, and understand mutability and immutable values in practical examples.
Explore Swift's primitive types, including int, double, string, bool, and tuple, and learn how explicit type annotations, casting, and strong type checking guide numeric and graphics values.
Explore optionals in Swift, where values can be underlying types or nil and are declared with a question mark. Learn explicit unwrapping with if let and bang to access values.
Learn strings and characters in Swift 2: declare and concatenate literals, handle mutable and immutable strings, iterate Unicode grapheme clusters, and safely convert strings to numbers with optionals.
Define booleans in Swift as true or false and test them explicitly. Learn how optional values affect booleans, avoid unwrapping nil, and use string interpolation to display results.
Explore Swift tuples: group multiple types into a single value, access elements by index or name, use named elements and wildcards, and return tuples from functions.
Learn to fix unresponsive Swift playgrounds by creating a new playground from the file menu, and explore Swift's collection types like arrays, sets, and dictionaries.
Match the command line tools version to the Xcode version by selecting it in Xcode preferences under locations, mirroring the version shown in about Xcode. This reduces playground errors.
Explore Swift arrays: zero-based indexing, typed and generic collections, and operations like append, insert at index, remove, and slicing; use ranges and for loops to iterate.
Explore Swift sets, an unindexed collection of unique values, with operations like union, intersection, subtraction, and disjoint checks; learn initialization, membership tests, and converting to arrays for sorting.
Explore dictionaries in Swift: create key-value collections with hashable keys and uniform value types, update and remove entries, access values as optionals, and convert to arrays for sorting and tables.
Explore swift loops: for, for-in, while, and repeat, covering counted vs uncounted loops, array initialization and indexing safety, scope of loop variables, and break and continue controls.
Learn decision constructs in Swift, focusing on if, guard, and switch. Discover how if supports else if and else, guard's boolean condition, and switch cases, defaults, and tuple switches.
Master Swift basic function syntax, including parameter lists, optional returns, and external vs internal parameter names, with arrows and parentheses guiding calls.
Explore default and variadic parameters in Swift functions, using external and internal names, default values, and end-of-list rules to manage calls and sums.
Learn how swift treats value types and reference types, value types copy when passed to functions; reference types pass objects; use inout with ampersand for mutating and tuple swaps.
Learn how Swift treats functions as first-class types, enabling you to specify, pass, assign, and return functions, including nested functions and closures that implement an absolute value example.
Explore closures in Swift as a type of function that captures scope, supports trailing closures, maps and reduces collections, and enables higher-order function patterns.
Explore swift enumerations as a type definition that can take one of red, amber, or green, with type association and inferred states, illustrating how enums replace unions.
Learn how raw values in a c-like enumeration work, assign an initial integer to the first case, and use a stoplight example to show how subsequent values increment.
Learn how enumerations with associated types in Swift behave like unions, storing ints or chars, and use switch to extract values; explore embedding functions, self, and optional arrays from strings.
Learn how enumerations can have initializers, including a default initializer that sets self to Sunday for a days of week example, and raw value initializers for enums with raw values.
Explore mutating functions in enums by reassigning self to change the case, using var instances, and understanding how new values replace old ones under the hood.
Explore classes and structures in Swift, their properties and methods, and how inheritance, reference versus value types, and mutating behavior shape usage.
Explore computed properties in Swift 2 by deriving a circle's area from its radius with a getter, updating radius via a setter from an area, and using willSet and didSet.
Explore property observers in Swift 2, using willSet and didSet to track stored properties like circle radius and stack push, while noting that calculated properties like area ignore observers.
Learn how lazy stored properties defer memory allocation until needed, using a closure to compute a decimal value for a fraction, with optional nil handling for division by zero.
Explore type properties and type methods in Swift 2, where static properties belong to the type itself and factory methods create points, accessed via the type rather than instances.
Explains inheritance in Swift by building a root Item class and a SellableItem subclass, showing properties, initializers, overriding, and calculating total price with a discount.
This course teaches the basics of version 2 of the Swift language. Swift is a powerful language used to develop applications for iPhone, iPad, and OS X. In this course, you’ll learn about Xcode 7 (Apple’s integrated development environment), and learn to write short programs in Swift, which will prepare you to start learning to develop full applications for Macs and Apple’s mobile devices.
The course contains over 5 hours of video demos and many source code examples. It is divided into six units:
Unit 1: Xcode - covers the various parts of the Xcode interface and how to use them
Unit 2: Swift types - covers variables and constants and the various basic data types in Swift, along with a full discussion of optionals.
Unit 3: Collections and control structures - learn about arrays, sets, and dictionaries, which are used to group basic types into collections. Also covers loops and decision constructs in the Swift language.
Unit 4: Functions - beginning with a discussion of value and reference types, we explore Swift function syntax, which forms the basis for methods in object oriented code. We’ll also discuss closures, and give examples of when and how to use them.
Unit 5: Enumerations - Forget those simple C enums: Swift’s enumerations can contain methods, and the members of an enum may have underlying values, no values at all, or may be of different values altogether!
Unit 6: Structures and Classes - In Swift, structures (as well as classes) may have both properties and methods defined. We’ll focus mainly on the property syntax here (the method syntax is the same as function syntax, covered in Unit 4). A full discussion of stored and computed properties, property observers, lazy and static properties. We’ll conclude with a demo on inheritance.
All units have full source code and exercises (along with answers) to test your knowledge.