Reputation: 1
CGPoint location = [recognizer locationInView:self.view];
[self showImageWithText:@"swipe" atPoint:location];
if ([recognizer direction] == UISwipeGestureRecognizerDirectionLeft) {
location.x -= 220.0;
}
else {
location.x += 220.0;
}
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.55];
myimage.alpha = 0.0;
myimage.center = location;
[UIView commitAnimations];
Upvotes: 0
Views: 74
Reputation: 112873
Either the class instance that recognizer
is an instance of is not valid or that class does not have a method direction
. It might be invalid if it has not been instantiated or because it no longer points to a valid object, perhaps released and dealloced.
Upvotes: 1