Ragunath
Ragunath

Reputation: 1

Request for member 'direction 'in something not a structure or union

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

Answers (1)

zaph
zaph

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

Related Questions