Designing Animations with UIViewPropertyAnimator in iOS 10 and Swift 3 This is part of a series of tutorials introducing new features in iOS 10, the Swift programming language, and the new XCode 8 beta, which were just announced at WWDC 16 UIKit in iOS 10 now has “new object-based, fully interactive and interruptible animation support…
Category: Swift
Swift development tutorials and news
Developing tvOS Apps for Apple TV [Part 1]
Here’s what you’ll have at the end of part 2 of this tutorial if you follow along: Looking for some help building your Apple TV tvOS App? I’m available for consulting and development, contact me. Apple TV Developer Tools Before we get started you’ll need the Xcode 7.1 beta, which you can download here: Download…
List Comprehensions and Performance With Swift
This post written on August 15, 2015 to be compatible with Xcode 6 and Swift 1.2 List comprehensions provide a concise way to create lists. You can accomplish list comprehension-like operations in Swift even though list comprehensions are not mentioned in the Swift language guide. Say you want to create a list of squares, like:…
Swift 2 – What’s new
Monday Apple announced Swift 2, and just about everything announced is an extremely welcome change. This post is a summary of Chris Lattner’s discussion in the WWDC video “What’s new in Swift”. Now, let’s run through them… Fundamentals enums can now be printed to the console and show the actually value instead of just (enum…
Open Source Swift – A Look At The Top Swift Repositories
Github, the most popular open source repository for open source software, offers a feature that let’s us view repositories by language. In this post, I want to dissect some of the most popular Swift repositories as of June 5th, 2015. So, let’s kick it off with the most starred Swift repository, Alamofire. Alamofire Alamofire is…
Function Currying in Swift
Function Currying in Swift The concept of currying is that instead of accepting multiple arguments, a function accepts only one, and returns a function which acepts the remaining arguments. The returned function will also accept only one argument, and returns another function. This process continues until all arguments are exhausted and we are left only…
Functional Programming in Swift
Thoughts on Functional Programming in Swift Like most of you, I have to use Objective-C at my day job. I could only craft my Swift skills at night. Swift is not a purely functional language. It can be use imperatively because all frameworks from Apple are written in Objective-C at the time of writing. However,…
Local Notifications in iOS 10 with Swift (Part 1)
This post has been updated for compatibility with XCode 8 and iOS 10 Local notifications are a simple way to display information to your user even when your app is in the background. They allow you to display an alert, play a sound or badge your app’s icon. Local notifications can be triggered at a scheduled time…
Local Notifications in iOS 9+ with Swift (Part 2)
This post has been updated for compatibility with XCode 8 and iOS 10 In part 1 of this series, we created a simple to-do list application that used local notifications to alert users when to-do items were overdue. This time, we’re going to build on that the project by enabling application icon badges to display the…
Fun with CAShapeLayer
CAShapeLayer is a specialized subclass of CALayer that draws itself using the shape you define via the path property. path is an instance of CGPath. We could leverage the convenient UIBezierPath APIs to create a path, and then retrieve the CGPath from it. Besides all the animatable properties inherited from CALayer, there are other animatable…