title: Tracking UITouches with CFDictionary
body: <p>I'm looking for some sample code to track UITouches with a CFDictionary. Unfortunately the apple-docs don't have a complete example.</p>
  
  <p><a href="http://developer.apple.com/library/IOs/#documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/MultitouchEvents/MultitouchEvents.html#//apple_ref/doc/uid/TP40009541-CH3-SW7" rel="nofollow">http://developer.apple.com/library/IOs/#documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/MultitouchEvents/MultitouchEvents.html#//apple_ref/doc/uid/TP40009541-CH3-SW7</a></p>
  
  <p>I'm currently using NSMutable array, but I want to store the complete UITouch object, so to get the timestamp as well.</p>
  
  <pre><code>NSMutableArray *touchArray_val;
  
  
  -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
      touchArray_val = [[NSMutableArray alloc] init];             
  }
  
  -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{ 
  
       for(UITouch *t in touches){
           CGPoint currentPoint = [t locationInView:self];
           [touchArray_val addObject:[NSValue valueWithCGPoint: currentPoint]];    
       }
  
  }
  
  -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{        
      NSLog(@"%i",[touchArray count]);
  
      for(NSValue *val in touchArray_val){        
          NSLog(@"%@",val);      
      }
  }
  </code></pre>