Free Swift iOS and tvOS Tutorials

Articles

Free Swift iOS and tvOS Tutorial – Nil Coalescing Operators with Swift
Free Swift iOS and tvOS Tutorial – Nil Coalescing Operators with Swift
by Justin

Continuing from yesterday's exercise, we will add an init and deinit statement to our Swift class. For any first time…

Free Swift iOS and tvOS Tutorial – Logical AND OR operators with Swift
Free Swift iOS and tvOS Tutorial – Logical AND OR operators with Swift
by Justin

Continuing from yesterday's exercise, we will add an init and deinit statement to our Swift class. For any first time…

Free Swift iOS and tvOS Video Tutorial – Ternary Conditional Operators in Swift 2
Free Swift iOS and tvOS Video Tutorial – Ternary Conditional Operators in Swift 2
by Justin

This video tutorial we’ll talk about how to shorthand some if…else statements with the ternary conditional operators. With a bool…

Free Swift iOS and tvOS Video Tutorial – Why Program Using Optionals in Swift
Free Swift iOS and tvOS Video Tutorial – Why Program Using Optionals in Swift
by Justin

In this Swift video tutorial, we’ll discuss the how’s and why’s of programming optional variables in any of your iOS…

Free Swift iOS and tvOS Tutorial – Manipulating Strings in Swift 2
Free Swift iOS and tvOS Tutorial – Manipulating Strings in Swift 2
by Justin

In this video tutorial, we’ll discuss some of the fun you can have with String type variables with Swift 2…

Free Swift iOS and tvOS Tutorial – Defer Statements and Programming with Emojis
Free Swift iOS and tvOS Tutorial – Defer Statements and Programming with Emojis
by Justin

Time to learn about defer statements! This chunk of code runs in functions marked with the throws option, regardless of…

Free Swift iOS and tvOS Tutorial – How to Program Generics with Swift
Free Swift iOS and tvOS Tutorial – How to Program Generics with Swift
by Justin

In this video tutorial we'll look at how to use Generics in a Swift function. A generic function or method…

Free Swift iOS and tvOS Tutorial – Classes with Init and Deinit Statements
Free Swift iOS and tvOS Tutorial – Classes with Init and Deinit Statements
by Justin

Continuing from yesterday's exercise, we will add an init and deinit statement to our Swift class. For any first time…

Free Swift iOS and tvOS Tutorial – Error Types with Swift
Free Swift iOS and tvOS Tutorial – Error Types with Swift
by Justin

This tutorial we will discuss Error types in Swift, include do and catch statements. This can be a tad confusing…

Free Swift iOS and tvOS Tutorial – Class Basics with Swift and Sprite Kit
Free Swift iOS and tvOS Tutorial – Class Basics with Swift and Sprite Kit
by Justin

We'll dive back into the official Swift Programming Guide to look at how to write a Class. Yes, one of…

Free Swift iOS and tvOS Tutorial – How to Open URLs in Safari with Swift
Free Swift iOS and tvOS Tutorial – How to Open URLs in Safari with Swift
by Justin

This video we'll learn how to open the Safari window within your iOS app itself, which can also limit the…

Free Swift iOS and tvOS Tutorial – Functions with Parameters that Return Multiple Values
Free Swift iOS and tvOS Tutorial – Functions with Parameters that Return Multiple Values
by Justin

We'll go through more of the official Swift Programming in this iOS / tvOS video tutorial. This episode we look…

Free Swift iOS and tvOS Tutorial – SKActions in Sprite Kit
Free Swift iOS and tvOS Tutorial – SKActions in Sprite Kit
by Justin

In this iOS and tvOS Swift / Sprite Kit video tutorial, we'll take a humorous look at creating a sprite…

Free Swift iOS and tvOS Tutorial – For and Switch statements
Free Swift iOS and tvOS Tutorial – For and Switch statements
by Justin

This episode we take some code straight from Apple's Swift 2.2 Programming documentation and pick it apart. Or pick on…

Free Swift iOS and tvOS Tutorial – While Statements vs the Update Function in Sprite Kit
Free Swift iOS and tvOS Tutorial – While Statements vs the Update Function in Sprite Kit
by Justin

In this video podcast, we will look at incrementing variables using a traditional while statement, then compare that to the…

Free Sprite Kit Tutorial – Working with the Scene Editor in Xcode
Free Sprite Kit Tutorial – Working with the Scene Editor in Xcode
by Justin

Learn how to animate frame sequences and create movement actions in the Timeline of Xcode 7's Scene Editor. We'll also…

Free Swift iOS and tvOS Tutorial – Dictionaries with Sprite Kit and Swift 2
Free Swift iOS and tvOS Tutorial – Dictionaries with Sprite Kit and Swift 2
by Justin

Learn more Swift 2, as we cover the basics of Dictionaries in this CartoonSmart.com video tutorial podcast. We'll discuss how…

Free Swift iOS and tvOS Tutorial – Arrays with Sprite Kit and Swift 2
Free Swift iOS and tvOS Tutorial – Arrays with Sprite Kit and Swift 2
by Justin

Learn more Swift 2, as we cover the basics of Arrays in this video tutorial podcast. We'll discuss creating an…

Free Swift iOS and tvOS Tutorial – Basic Variable Types with Swift
Free Swift iOS and tvOS Tutorial – Basic Variable Types with Swift
by Justin

Learn the basics as we discuss String, Int and Float types in Swift and Sprite Kit in Xcode.

Free Swift iOS and tvOS Tutorial – Casting with Swift and Sprite Kit
Free Swift iOS and tvOS Tutorial – Casting with Swift and Sprite Kit
by Justin

Learn how to cast a child in your Sprite Kit scene as a declared variable in your GameScene.swift file. We'll…

Troubleshooting Arrays in a Property List with Swift
Troubleshooting Arrays in a Property List with Swift
by Justin

I had the worst time recently trying to convert AnyObject to a Swift Array when parsing a property list. You…

Swift Basics – Part 9 – Subclasses
Swift Basics – Part 9 – Subclasses
by Justin

I think subclassing is on the borderline of what I would consider “the basics”. Conceptually it can be a bit…

Swift Basics – Part 8 – Class Initializers
Swift Basics – Part 8 – Class Initializers
by Justin

This Swift tutorial video continues right where the previous video semi-abruptly leaves off. Translation: it just got too long for…

Swift Basics – Part 7 – Classes and Structs
Swift Basics – Part 7 – Classes and Structs
by Justin

This video tutorial we’ll look at classes mostly, and a little bit into structs (or structures).  Structures and classes are…

Swift Basics – Part 6 – Arrays, Dictionaries and For Loops
Swift Basics – Part 6 – Arrays, Dictionaries and For Loops
by Justin

In this Swift tutorial we will create variables of both Array and Dictionary types. We’ll also play around with iterating through each…

Swift Basics –  Part 5 – Enumerations and Switch Statements
Swift Basics – Part 5 – Enumerations and Switch Statements
by Justin

In this Swift video tutorial, we look at enumerations and switch statements. What are enumerations?  Imagine creating a bunch of…

Swift Basics – Part 4 – If Statements
Swift Basics – Part 4 – If Statements
by Justin

This lesson we’ll look at if statements, if…else statements, bool variables, and how to create a variable in an if…

Swift Basics – Part 3 – Functions
Swift Basics – Part 3 – Functions
by Justin

If this video we’ll look at functions in Swift, or methods if you want to use the Objective-C lingo.  Below…

Swift Basics – Part 2 – Variables, Optionals and Forced Unwrapping
Swift Basics – Part 2 – Variables, Optionals and Forced Unwrapping
by Justin

In this video tutorial,  we’ll look at creating variables in a Playground file. Initially we’ll just look at  number types,…

Swift Basics – Part 1 – Xcode First Timers
Swift Basics – Part 1 – Xcode First Timers
by Justin

In this video we simply create a Swift-based Sprite Kit project, and talk a little about the initial setup in Xcode.…

Swipe Gesture Recognizers with Sprite Kit and Swift
Swipe Gesture Recognizers with Sprite Kit and Swift
by Justin

Here’s a quick snippet of Swift and Sprite Kit code for those of you that need it. Below we set up…

Parsing a Property List using Swift
Parsing a Property List using Swift
by Justin

Ran into a wee-bit of a challenge tonight with Xcode and parsing a property list with Swift. For reference, here’s the…

Day 5 – Learn Sprite Kit and Swift – Contacts and Collisions
Day 5 – Learn Sprite Kit and Swift – Contacts and Collisions
by Justin

Day 5: Today, we look at Contact Listeners and Collision Detection in Swift. Highlights include: Setting the GameScene class to be the…

Day 4 – Learn Swift and Sprite Kit – Initialize with a Dictionary, For Loops and More Physics
Day 4 – Learn Swift and Sprite Kit – Initialize with a Dictionary, For Loops and More Physics
by Justin

Day 4: Create multiple platforms for a typical game character to walk on We create a Dictionary to pass data into a subclass of…

Day 3 – Learn Swift and Sprite Kit – Part 2
Day 3 – Learn Swift and Sprite Kit – Part 2
by Justin

Day 3 – “Round 2,  Fight!” Highlights of this part include: Use the enumerateChildNodesWithName function to examine every node in the…

Day 3 – Learn Swift and Sprite Kit – Part 1
Day 3 – Learn Swift and Sprite Kit – Part 1
by Justin

Day 3 – The saga continues. Highlights of Part 1 We start with a new project using some Bro-tastic game art…

Day 2 – Learn Swift and Sprite Kit – Some Physics Properties
Day 2 – Learn Swift and Sprite Kit – Some Physics Properties
by Justin

Day 2 Highlights Added some physics properties using our old friend SKPhysicsBody Wrote a couple functions, one in our class…

Day 1 – Learn Swift and Sprite Kit
Day 1 – Learn Swift and Sprite Kit
by Justin

Well today I officially started learning Swift and Sprite Kit together. Keyword being “together” as I’ve been using Sprite Kit…

Problem when Xcode Simulator Builds to iPhone 6 or iPhone 6 Plus
Problem when Xcode Simulator Builds to iPhone 6 or iPhone 6 Plus
by Justin

I had this issue with a couple projects recently, one of which was my Fantastic Worlds iOS Starter Kit.  It was…

Adding iAds to a Sprite Kit App
Adding iAds to a Sprite Kit App
by Justin

Lets see if I can remember the steps to adding iAds to a Sprite Kit (Objective C) project. First be…

Sprite Kit crashing with NSGenericException “mutated while being enumerated”
Sprite Kit crashing with NSGenericException “mutated while being enumerated”
by Justin

For those of you Sprite Kit users jumping on the newest version of Xcode, you might run into this… Terminating app…

A Sprite Kit issue changing the xScale or yScale of a physics body
A Sprite Kit issue changing the xScale or yScale of a physics body
by Justin

So it seems Sprite Kit doesn’t like it when a node has a physics body and you change the xScale…

Sprite Kit Gravity 101
Sprite Kit Gravity 101
by Justin

For those of us that didn’t really pay attention in high school physics, the term “vector” might sound fancy. It…

Properly removing nodes with Sprite Kit
Properly removing nodes with Sprite Kit
by Justin

The word “properly” might be an overstatement as there could be even more proper ways to remove a node, but…

Tile a background image with Sprite Kit.
Tile a background image with Sprite Kit.
by Justin

This caused me some initial issues (mostly to do with a critical warning about the context equaling 0,0) but I…

How to mask with Sprite Kit
How to mask with Sprite Kit
by Justin

Masking is quite easy with Sprite Kit. Easier than I thought it would be, and you copy and paste this…

Using the update method of your SKScene to update other nodes.
Using the update method of your SKScene to update other nodes.
by Justin

Your SKScene class, whatever that may be called, has an update method like so… You’ve already seen that code…

Stopping Scheduled Performers (or Selectors) in Sprite Kit
Stopping Scheduled Performers (or Selectors) in Sprite Kit
by Justin

Similar to unscheduling selectors in Cocos2d, with Sprite Kit you might decide to cancel a method that was told to…

How to rotate a SKSpriteNode forever!
How to rotate a SKSpriteNode forever!
by Justin

This is a very simple bit of code here, but I’m sure I’ll forget it myself one day, so for…

Gesture Recognizers with Sprite Kit
Gesture Recognizers with Sprite Kit
by Justin

Everyone loves gestures right? Long ago Apple realized it would be convenient to have an easy way to detect things…

SpriteKit’s insertChild, addChild and zPosition
SpriteKit’s insertChild, addChild and zPosition
by Justin

I’m about 2 weeks into using Sprite Kit and I’ve finally come face to face with a reason to use insertChild.…

Subscribe to over 700 hours of video tutorials, free game art, iOS Starter Kits & More!

Find out more