April 2015
Intermediate to advanced
556 pages
17h 47m
English
Let’s create an application that uses Core Animation to drive the interface. This particular application will load all the images it finds in a folder and display them using CALayer objects (Figure 33.1).
Figure 33.1 Completed application
In Xcode, create a new project called Scattered. Make sure that Swift is selected as the Language. You will be using a storyboard in this project, so check Use Storyboards. The project will not be document-based or use Core Data.
Open ViewController.swift and make the following additions:
import Cocoa
class ViewController: NSViewController {
var textLayer: CATextLayer!