Swift roundup: Interesting sample code and tutorials I’ve found this week

by Joey deVilla on June 12, 2014

swift roundup

swift kickAs useful as Apple’s The Swift Programming Language book is, it’s focused solely on the language and has nothing at all about the other 90% of iOS development: the various Cocoa Touch APIs and libraries. Luckily, it’s not that hard for a developer with some iOS/Objective-C coding experience to figure out how to call on them in Swift, and a number of them are sharing their knowledge and findings. Here are some of the more interesting Swift finds that I’ve stumbled across online this week.

Tutorial: Conway’s “Game of Life”

life in swift

If you’re looking for a tutorial that walks you through the process of building a reasonably complete iOS app, MakeGamesWith.Us’s tutorial is for you! You’ll build Conway’s Game of Life using SpriteKit, and get a better understanding of how to call various Cocoa Touch APIs in Swift.

Brian Advent’s video tutorials

If you’ve gone through Apple’s The Swift Programming Language book and are feeling confident about the language itself but less so about calling the various iOS APIs, you’ll find Brian Advent’s video tutorials helpful.

Simple UI in Swift

Want to get started writing full iOS apps in Swift rather than just coding up language-features-only stuff from the book? Start here.

Swift and UIKit

This goes over Swift and some of the UI features we’ve come to know and love — text fields, alert views, and table views — as well as using Swift delegates and closures.

Blurring with UIVisualEffect and Preview in Interface Builder

UIVisualEffect is a new class in iOS 8; this tutorial shows you how to use it to get a blur visual effect. This video also shows you how to use the Preview feature in IB.

iOS 8 notification

iOS 8 lets you add custom actions to your notifications, whether on the lock screen, the Home screen, or the Notification Center. This tutorial shows you how to code them.

Swift projects on Github

Swift-2048

swift - 2048

Austin Zheng posted iOS-2048, his rendition of the game 2048 in Objective-C a few months back, and he’s since made a Swift version, Swift-2048. It’s not complete, but the basic game works, and it should give you a good starting point for your own non-SpriteKit game projects.

Swift Weather

swiftweather

Swift Weather uses not just an Apple API — Core Location —  but also the third-party AFNetworking framework by way of CocoaPods. Be sure to follow the “How to Build” section of the readme.

Want to see more Swift content?

Click here or on the “Swift Kick” logo near the top of this article to see all the Swift-related articles on Global Nerdy.

{ 1 comment… read it below or add one }

1 Paul Colton June 13, 2014 at 11:15 am

We’ve starter a twitter account for Swift tips, tricks and recipes called SwiftOverflow. https://twitter.com/swiftoverflow

Leave a Comment

Previous post:

Next post: