0

Here is my relevant code:

UITouch *touch;         
NSArray *touches = [NSArray arrayWithObject:touch];
//The statement below throw the LLVM compiler error
[self touchesMoved:[NSSet setWithArray:touches] withEvent:UIEventTypeTouches];

here is the declaration of touchesMoved:withEvent: method:

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;

Seems like I need to explicitly convert UIEventTypeTouches to UIEvent, how to fix that?

Malloc
  • 15,434
  • 34
  • 105
  • 192
  • 1
    What are you trying to do? You can't call `touchesMoved:withEvent:` manually. You can implement it as a delegate method or override it in a `UIGestureRecognizer` subclass. – Desdenova Jul 12 '13 at 13:54

1 Answers1

0

The compiler is complaining because UIEventTypeTouches is an NSInteger (defined in an enum) and touchesMoved:withEvent: is expecting a UIEvent object. You can probably get away with just passing nil for the event param:

[self touchesMoved:[NSSet setWithArray:touches] withEvent:nil];
Tyler
  • 371
  • 1
  • 7