저는 현재 스 와이프 제스처를 사용하여 한 뷰에서 다른 뷰로 애니메이션하려고합니다. 다시 스 와이프 제스처는 뷰 A를 화면 왼쪽에서 애니메이트 한 다음 오른쪽에서 B 뷰와 함께 애니메이트합니다.UIView animation annomily
이것은 내 응용 프로그램에서 실제로 작동하지만보기 A의 가장자리에있는보기 B 대신에 애니메이션보기가 있고 동시에 움직이기 때문에보기 A의 애니메이션이 끝날 때까지보기 B가 움직이지 않습니다. .
이 코드가
- (void)swipedScreen:(UISwipeGestureRecognizer*)gesture
{
if (gesture.direction = UISwipeGestureRecognizerDirectionLeft) {
[UIView animateWithDuration:1.50 animations:^{
// [self.detailViewB.view setAlpha:1.0f];
[self.detailViewB.view setCenter:CGPointMake(CGRectGetMidX(self.view.frame), CGRectGetMidY(self.view.frame))];
[self.detailViewA.view setCenter:CGPointMake(-640, CGRectGetMidY(self.view.frame))];
}];
}
}
모습입니다 그리고 당신은 소스를 직접 컴파일하려는 경우 여기에 내가 함께 장난하고있는 코드에 대한 링크입니다. http://dl.dropbox.com/u/53813770/SMPrototypeB.zip
모든 도움을 주시면 대단히 감사하겠습니다.
시도를' –