Skip to content

Instantly share code, notes, and snippets.

View garymansted's full-sized avatar
💭
Jesus is the key

Gary Mansted garymansted

💭
Jesus is the key
View GitHub Profile
@garymansted
garymansted / CheckDeviceMotion.swift
Created August 26, 2016 09:46
Check devices motions -> pitch, roll and yaw SWIFT
import CoreMotion // Import CoreMotion (header)
// Class vars
var pitch = 0.0
var attitude: CMAttitude?
var roll = 0.0
var yaw = 0.0
let motionManager = CMMotionManager() // Create motionManager instance