Skip to main content

Hacking with iOS – learn to code iPhone and iPad apps with free Swift tutorials

About 8 minSwiftiOSArticle(s)bloghackingwithswift.comcrashcourseswiftxcodeappstoreios

Hacking with iOS – learn to code iPhone and iPad apps with free Swift tutorials κ΄€λ ¨

Hacking with iOS – learn to code iPhone and iPad apps with free Swift tutorials

Learn Swift coding for iOS with these free tutorials – learn Swift, iOS, and Xcode

Whether you want to learn SwiftUI or UIKit, Hacking with iOS is a complete tutorial series written for Swift and iOS, taking you from beginner to advanced using hands-on projects.

UIKit Edition

Introduction to Swift

Introduction to Swift

Learn the basics of Swift syntax using Xcode playgrounds – start here if this is your first time using Swift.

Project 1: Storm Viewer

Constants and variables, UITableView, UIImageView, FileManager, storyboards

Project 1: Storm Viewer

Get started coding in Swift by making an image viewer app and learning key concepts.

Project 2: Guess the Flag

Asset catalogs, UIButton, CALayer, UIColor, UIAlertController

Project 2: Guess the Flag

Make a game using UIKit, and learn about integers, buttons, colors and actions.

Project 3: Social Media

UIBarButtonItem, UIActivityViewController, URL

Project 3: Social Media

Let users share to Facebook and Twitter by modifying project 1.

Project 4: Easy Browser

loadView(), WKWebView, URLRequest, UIToolbar, UIProgressView, key-value observing

Project 4: Easy Browser

Embed Web Kit and learn about delegation, KVO, classes and UIToolbar.

Project 5: Word Scramble

Closures, method return values, booleans, NSRange

Project 5: Word Scramble

Create an anagram game while learning about closures and booleans.

Project 6: Auto Layout

NSLayoutConstraint, Visual Format Language, layout anchors

Project 6: Auto Layout

Get to grips with Auto Layout using practical examples and code.

Project 7: Whitehouse Petitions

JSON, Data, UITabBarController

Project 7: Whitehouse Petitions

Make an app to parse Whitehouse petitions using JSON and a tab bar.

Project 8: 7 Swifty Words

addTarget(), enumerated(), count(), index(of:), joined(), property observers, range operators

Project 8: 7 Swifty Words

Build a word-guessing game and master strings once and for all.

Project 9: Grand Central Dispatch

DispatchQueue, perform(inBackground:)

Project 9: Grand Central Dispatch

Learn how to run complex tasks in the background with GCD.

Project 10: Names to Faces

UICollectionView, UIImagePickerController, UUID, classes

Project 10: Names to Faces

Get started with UICollectionView and the photo library.

Project 11: Pachinko

SpriteKit, physics, blend modes, radians, CGFloat, NSKeyedUnarchiver

Project 11: Pachinko

Dive into SpriteKit to try your hand at fast 2D games.

Project 12: UserDefaults

UserDefaults, NSCoding, Codable, NSKeyedArchiver

Project 12: UserDefaults

Learn how to save user settings and data for later use.

Project 13: Instafilter

Core Image, UISlider, writing to the photo library

Project 13: Instafilter

Make a photo manipulation program using Core Image filters and a UISlider.

Project 14: Whack-a-Penguin

SKCropNode, SKTexture, asyncAfter()

Project 14: Whack-a-Penguin

Build a game using SKCropNode and a sprinkling of Grand Central Dispatch.

Project 15: Animation

Core Animation, CGAffineTransform

Project 15: Animation

Bring your interfaces to life with animation, and meet switch/case at the same time.

Project 16: Capital Cities

MKMapView, MKAnnotation, MKPinAnnotationView, CLLocationCoordinate2D

Project 16: Capital Cities

Teach users about geography while you learn about MKMapView and annotations.

Project 17: Space Race

Per-pixel collision detection, advancing particle systems, linear and angular damping

Project 17: Space Race

Dodge space debris while you learn about per-pixel collision detection.

Project 18: Debugging

print(), assert(), breakpoints, and view debugging

Project 18: Debugging

Everyone hits problems sooner or later, so learning to find and fix them is an important skill.

Project 19: JavaScript Injection

Safari extensions, UITextView, NotificationCenter

Project 19: JavaScript Injection

Extend Safari with a cool feature for JavaScript developers.

Project 20: Fireworks Night

Timer, follow(path:), sprite color blending, shake gestures

Project 20: Fireworks Night

Learn about timers and color blends while making things go bang!

Project 21: Local Notifications

UNUserNotificationCenter, UNNotificationRequest, UNMutableNotificationContent, UNCalendarNotificationTrigger, and UNTimeIntervalNotificationTrigger

Project 21: Local Notifications

Send reminders, prompts and alerts even when your app isn't running.

Project 22: Detect-a-Beacon

CLLocationManager, CLBeaconRegion, CLProximity

Project 22: Detect-a-Beacon

Learn to find and range iBeacons using our first project for a physical device.

Project 23: Swifty Ninja

SKShapeNode, AVAudioPlayer, UIBezierPath, custom enums

Project 23: Swifty Ninja

Learn to draw shapes in SpriteKit while making a fun and tense slicing game.

Project 24: Swift Strings

contains(where:), NSAttributedString

Project 24: Swift Strings

Dive deep into the workings of Swift's strings

Project 25: Selfie Share

Multipeer Connectivity Framework

Project 25: Selfie Share

Make a multipeer photo sharing app in just 150 lines of code.

Project 26: Marble Maze

Core Motion, collision bitmasks, array reversing, compiler directives

Project 26: Marble Maze

Respond to device tilting by steering a ball around a vortex maze.

Project 27: Core Graphics

Core Graphics

Project 27: Core Graphics

Draw 2D shapes using Apple's high-speed drawing framework.

Project 28: Secret Swift

Touch ID and Face ID, device keychain

Project 28: Secret Swift

Save user data securely using the device keychain and Touch ID.

Project 29: Exploding Monkeys

Mixing UIKit and SpriteKit, texture atlases, scene transitions, destructible terrain

Project 29: Exploding Monkeys

Remake a classic DOS game and learn about destructible terrain and scene transitions.

Project 30: Instruments

Profiling, shadows, image caching

Project 30: Instruments

Become a bug detective and track down lost memory, slow drawing and more.

Project 31: Multibrowser

UIStackView, multitasking for iPad, size classes

Project 31: Multibrowser

Get started with UIStackView and see just how easy iPad multitasking is.

Project 32: SwiftSearcher

Core Spotlight, SFSafariViewController, NSAttributedString, Dynamic Type, automatic UITableViewCell sizing

Project 32: SwiftSearcher

Add your app's content to iOS 9's Spotlight search and take advantage of the new Safari integration.

Project 33: What's that Whistle?

CloudKit, CKRecord, CKQuery, CKQuerySubscription, AVAudioRecorder, and push messages

Project 33: What's that Whistle?

Build a crowd-sourced song recognition app using Apple's free platform as a service: CloudKit.

Project 34: Four in a Row

GameplayKit, GKMinmaxStrategist, GKGameModel, UIStackView, map()

Project 34: Four in a Row

Let iOS take over the AI in your games using GameplayKit.

Project 35: Generating random numbers

GameplayKit, GKRandomSource, GKARC4RandomSource, GKRandomDistribution, GKShuffledDistribution, GKGaussianDistribution

Project 35: Generating random numbers

GameplayKit lets you generate random numbers in ways you soon won't be able to live without.

Project 36: Crashy Plane

SKAudioNode, GameplayKit randomization, and the guard keyword

Project 36: Crashy Plane

Ever wanted to make a Flappy Bird clone? Now you can do it in under an hour thanks to SpriteKit.

Project 37: Psychic Tester

CAEmitterLayer, CAGradientLayer, IBDesignable, transition(with:), 3D Touch, WatchKit

Project 37: Psychic Tester

Are you psychic? Of course not. But what if we could use our coding skills to make a game to fool your friends into thinking otherwise?

Project 38: GitHub Commits

Core Data, NSPersistentContainer, NSFetchRequest, NSSortDescriptor, NSFetchedResultsController, DateFormatter

Project 38: GitHub Commits

Get on board with Core Data and learn to read, write and query objects using Apple's object graph and persistence framework.

Project 39: Unit testing with XCTest

XCTest, measure(), filter(), sort(), NSCountedSet

Project 39: Unit testing with XCTest

Learn how to write unit tests and user interface tests using Xcode's built-in testing framework.

Archived articles

Swift Knowledge Base - free Swift example code

Learn Swift coding for iOS with these free tutorials – learn Swift, iOS, and Xcode
What's new in iOS 11 for developers – Hacking with Swift

What's new in iOS 11 for developers
What's new in iOS 10 for developers – Hacking with Swift

What's new in iOS 10 for developers
What's new in iOS 10 for developers – Hacking with Swift

What's new in iOS 10 for developers
What's new in iOS 9 – Hacking with Swift

What's new in iOS 9
Free iOS 9 tutorials – Hacking with Swift

Free iOS 9 tutorials
What's new in Swift 4.0 – Hacking with Swift

Hands-on code examples to help you learn what's new in Swift 4: new encoding and decoding, smarter keypaths, multi-line strings, and more!
What's new in Swift 3.1 – Hacking with Swift

What's new in Swift 3.1
What's new in Swift 3.0 – Hacking with Swift

What's new in Swift 3.0
What's new in Swift 2.2 – Hacking with Swift

What's new in Swift 2.2
What's new in Swift 2.0 – Hacking with Swift

What's new in Swift 2.0
Key features in Swift – Hacking with Swift

Key features in Swift
Safari Content Blocking in iOS: a tutorial by example – Hacking with Swift

Safari Content Blocking in iOS: a tutorial by example

이찬희 (MarkiiimarK)
Never Stop Learning.