Skip to content

Instantly share code, notes, and snippets.

@rainypixels
rainypixels / AppDelegate.swift
Last active December 19, 2015 05:33
Snippet to initialize Digits
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Register for notifications
UIApplication.sharedApplication().configureNotifications()
// Initialize Fabric
Fabric.with([Digits.self()])
return true
}
/*
Swift Programming Language Guide
"A Swift Tour" Solutions
https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/GuidedTour.html#//apple_ref/doc/uid/TP40014097-CH2-XID_1
These are the solutions to all the "experiments" in the pre-release Swift Programming Guide
(released on the same day Apple announced Swift). A couple of things worth noting:
1. Swift syntax, e.g. array declarations, has changed since I releasd these. So this code will
probably cause some errors when you paste it into a playground. Should be easy enough to fix