Three Axes of Motion

To measure the length of the swing, the user needs to measure the period of the swing by holding the phone while swinging. Depending on how the user holds the phone, showing only the data for one direction might not be enough to figure out the peaks of the motion. The iPhone can measure acceleration along three perpendicular axes (see the image showing the arbitrary x-axis). To make it easier to measure the length of the swing, we want to display all the acceleration data to the user.

Open Main.storyboard. If the assistant editor is still open, make sure the storyboard is selected by clicking somewhere in it. Use the shortcut L to open the library, search for UIView, and drag a view between the existing diagram view ...

Get Build Location-Based Projects for iOS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.