다음을 사용하여 UIImageView 슬라이드를 약간 앞으로 만들고 시차 스크롤 효과를 위해 뒤로 멀리 슬라이드합니다.UIImageView 애니메이션에 약간의 완화 적용하기
코드 : 그냥 갑자기 앞뒤로 빠르게 슬라이드 만약 내가 지금, 애니메이션으로 일부 완화 적용에 대해 갈 수있는 방법을
[UIView animateWithDuration:0.2f animations:^{
spendrBckGrnd.frame = CGRectMake(spendrBckGrnd.frame.origin.x + 20, 0, spendrBckGrnd.frame.size.width, spendrBckGrnd.frame.size.height);
}];
[UIView animateWithDuration:0.4f animations:^{
spendrBckGrnd.frame = CGRectMake(spendrBckGrnd.frame.origin.x - 80, 0, spendrBckGrnd.frame.size.width, spendrBckGrnd.frame.size.height);
}];
을 궁금해하고있다. 슬라이딩 애니메이션을 들락날락하고 싶습니다.
그건 그게, 내가 UIView에서 그 다른 정적 메서드를 잡았 믿을 수 없어. BTW, 당신의 코드는 필요한 것처럼 작동하지만 두 번째 블록에 (BOOL 완료)를 추가해야합니다. –
맞습니다. 감사. 그것을 수정했습니다. –