Now fully updated for Swift 3, Hacking with Swift is a complete Swift training course that teaches you iOS app development through 39 hands-on projects. Everything is taught as part of a practical project, so you can immediately apply your knowledge as you learn – if you’re just starting out, there’s no faster way to learn!
This book takes you from absolutely no knowledge of Swift right through to 39 finished projects, all utilizing the latest frameworks from Apple. Yes, that includes UIKit, SpriteKit, WebKit, Core Graphics, Core Data, Core Image, Core Location, MapKit, and more. Everything you learn is fully updated for Swift 3 and iOS 10, so you can be sure you’re making the most of your time.
As a bonus, this book contains my complete Swift Knowledge Base: almost 300 tips, tricks and techniques to help jumpstart your iOS coding – instant copy and paste code that can help add features to your apps in minutes.
Here’s a complete list of all the projects included in the book, each one explained step by step so you learn while you code:
1. Storm Viewer: Get started coding in Swift by making an image viewer app and learning key concepts.
2. Guess the Flag: Make a game using UIKit, and learn about integers, buttons, colors and actions.
3. Social Media: Let users share to Facebook and Twitter by modifying project 1.
4. Easy Browser: Embed Web Kit and learn about delegation, KVO, classes and UIToolbar.
5. Word Scramble: Create an anagram game while learning about closures and booleans.
6. Auto Layout: Get to grips with Auto Layout using practical examples and code.
7. Whitehouse Petitions: Make an app to parse Whitehouse petitions using JSON and a tab bar.
8. 7 Swifty Words: Build a word-guessing game and master strings once and for all.
9. Grand Central Dispatch: Learn how to run complex tasks in the background with GCD.
10. Names to Faces: Get started with UICollectionView and the photo library.
11. Pachinko: Dive into SpriteKit to try your hand at fast 2D games.
12. UserDefaults: Learn how to save user settings and data for later use.
13. Instafilter: Make a photo manipulation program using Core Image filters and a UISlider.
14. Whack-a-Penguin: Build a game using SKCropNode and a sprinkling of Grand Central Dispatch.
15. Animation: Bring your interfaces to life with animation, and meet switch/case at the same time.
17. Swifty Ninja: Learn to draw shapes in SpriteKit while making a fun and tense slicing game.
18. Debugging: Everyone hits problems sooner or later, so learning to find and fix them is an important skill.
19. Capital Cities: Teach users about geography while you learn about MKMapView and annotations.
20. Fireworks Night: Learn about timers and color blends while making things go bang!
21. Local Notifications: Send reminders, prompts and alerts even when your app isn't running.
22. Detect-a-Beacon: Learn to find and range iBeacons using our first project for a physical device.
23. Space Race: Dodge space debris while you learn about per-pixel collision detection.
24. Swift Extensions: Try your hand at improving the built-in data types of Swift.
25. Selfie Share: Make a multipeer photo sharing app in just 150 lines of code.
26. Marble Maze: Respond to device tilting by steering a ball around a vortex maze.
27. Core Graphics: Draw 2D shapes using Apple's high-speed drawing framework.
28. Secret Swift: Save user data securely using the device keychain and Touch ID.
29. Exploding Monkeys: Remake a classic DOS game and learn about destructible terrain and scene transitions.
30. Instruments: Become a bug detective and track down lost memory, slow drawing and more.
31. Multibrowser: Get started with UIStackView and see just how easy iPad multitasking is in iOS 9.
32. SwiftSearcher: Add your app's content to Spotlight search and take advantage of Safari integration.
33. What's that Whistle?: Build a crowd-sourced song recognition app using Apple's free platform as a service. CloudKit.
34. Four in a Row: Let iOS take over the AI in your games using GameplayKit.
35. Generating random numbers: GameplayKit lets you generate random numbers in ways you soon won't be able to live without.
36. Crashy Plane: Ever wanted to make a Flappy Bird clone? Now you can do it in under an hour thanks to SpriteKit.
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?
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.
39. Unit testing with XCTest: Learn how to write unit tests and user interface tests using Xcode's built-in testing framework.
Customer ReviewsSee All
A Great Resource
This was my favorite resource for getting started with swift and iOS, the writing goes into great depth and tries to cover a broad range of topics. Every chapter is essentially a hands on approach to building a new project which helps you easily learn topics and reinforce what you previously learned. I would highly recommend this to anyone looking to get into iOS development with swift.
Amazing book to get you started.
This was the most useful book to get me started with Swift programming. The projects are interesting and fun. The style of teaching was informative and the concepts taught are practical for a lot of app development. If you want to learn swift by writing apps, this is the book for you!
Comprehensive And Clear
HWS is one of the few books (as of the end of 2016) that is thoroughly updated for Swift 3. While Swift is too massive to be completely covered in one or even several books, HWS covers a lot of ground. Apple's "The Swift Programming Language" reads as more of an encyclopedia, while HWS is like a compendium of short stories. You write a couple dozen functioning apps over a spectrum of app genres. Hudson really did his research on Swift's functionalities, and he product tested his apps iteratively before putting them in the book. A couple of times I had to Google my way to solving glitches that I couldn't figure out from Xcode's cryptic error messages, but that was in itself good training. Far more commonly, Hudson explains things much better than most user forums I've seen. Hudson often gives the brief history of the inevitable cruft inhabiting a even new language like Swift, making the obscure suddenly intelligible. Above all, Hudson clearly wants his readers to learn good Swift coding, unlike some teachers who seem to need to feed their egos by lording their superior knowledge over the student. After finishing HWS, I can watch any WWDC session video and follow nearly all of it: "Hey, I've seen that before..." I would recommend HWS to anybody beginning to learn Swift 3.