Updated for Xcode 6 / iOS 8.