Join Steven Lipton for an in-depth discussion in this video Add the pedometer, part of Advanced iOS App Development: Core Motion.
- [Instructor] You've just set the privacy motion…usage description setting in the info.plist.…Make sure you have done this step before going further…because the app may not work otherwise.…We'll need a user interface for this project.…To save you time, I created one for you already.…Open the project in the downloads folder…for this video, and you'll find a project user…interface in the main storyboard.…This is a stack view of five labels and one button.…Open up the assistant editor.…
You'll see I set up outlets for the label…and an action for the button.…I also added some constants for dynamically changing…the button color.…Close the assistant editor.…In the project navigator, click the…viewcontroller.swift file.…A very critical line just goes after the…import UIKit line, where we import core motion…so that we can use those methods.…
Next we'll add an instance of a pedometer.…Add a property to the view controller.…Var pedometer equals…cm pedometer.…You use the start/stop pedometer action…to toggle between starting and stopping the pedometer.…
- Reading Core Motion data
- Understanding Core Motion methods
- Creating a pedometer app
- Using pace and distance data from Core Motion
- Pushing and pulling device motion data
- Accessing the altitude sensors
- Working with the motion activity manager (CMMotionActivityManager)
Skill Level Advanced
iOS App Development: Accessibilitywith Kevin Favro2h 34m Intermediate
Advanced iOS Development: Working with APIswith Saul Mora1h 59m Intermediate
1. Core Motion Introduction
3. Device Motion
5. Recorded Data
Next steps1m 43s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.