Using iOS motion sensor on Swift