title: How to use CMMotionActivityManager and receive updates?
body: <p>I want to create an app that can receive and process motion updates in order to understand if the user is stationary, walking, running or is on a transport. 
  I've seen on the reference that CMMotionActivityManager can be useful for me.</p>
  
  <blockquote>
    <p>The CMMotionActivityManager class provides access to the motion data stored by a device. Motion data reflects whether the user is walking, running, in a vehicle, or stationary for periods of time. </p>
  </blockquote>
  
  <p>I'm new to app developing and I don't understand how to use the method for starting the updating.
  The method for doing this is <code>- (void)startActivityUpdatesToQueue:(NSOperationQueue *)queue withHandler:(CMMotionActivityHandler)handler</code>.
  I don't understand what should i write on handler because the reference says:</p>
  
  <blockquote>
    <p>handler
    The block to execute when a change in the current type of motion is detected. For information about the parameters of this block, see CMMotionActivityHandler. This property must not be nil.</p>
  </blockquote>
  
  <p>My implementation is:</p>
  
  <pre><code>- (IBAction)startButtonPressed:(id)sender {
  _motionActivityManager = [[CMMotionActivityManager alloc] init];
  [_motionActivityManager startActivityUpdatesToQueue:NSOperationQueueDefaultMaxConcurrentOperationCount withHandler:CMMotionActivityHandler];
  }
  </code></pre>
  
  <p>I've already imported the CoreMotion framework
  But XCode don't recognize <code>CMMotionActivityHandler</code>, where am I wrong? How can I resolve this problem?</p>
  
  <p>Thanks</p>