Updated for IOS 8, Xcode 6.1

fix syntax for new version of Swift
fix screen rotations on IOS8