0
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];
什麼是從控制檯的完整的錯誤信息,以及它發生在哪裏?你在使用ARC嗎?您可以編輯您的問題以添加該信息。 – zaph 2012-02-13 11:41:50