[UIView animateWithDuration:1 delay:4 options:(UIViewAnimationOptionAllowUserInteraction | UIViewAnimationOptionCurveEaseIn)
animations:^
{
// do something here (irrelevant)
}
completion:nil
];
지연 시간 내에 어떻게 애니메이션을 멈 춥니 까? 예를 들어,이 애니메이션을 실행 한 후 지연 타이머가 끝나기 전에이 애니메이션을 중지하고 싶습니다. 나는 [self.view.layer removeAllAnimations];
을 시도했지만 아무 소용이 없습니다.시작했지만 지연되고있는 UIView 애니메이션 중지
편집 : 앞에서 설명한대로. 나는 [self.view.layer removeAllAnimations];
을 시도했지만 아무 소용이 없습니다.
당신이 이런 식으로 포장하려 유무 :'[CATransaction 커밋] [theView.layer removeAllAnimations]'[CATransaction 시작]을; –
'animationWithDuration' 안에 코드를 보여줄 수 있습니까? 어쩌면 당신의'removeAllAnimations'이 다른보기에 있고보기에있는 것이 아니라 취소하고 싶습니까? : / – gran33