내 스크롤 뷰 대리자 메서드 scrollViewDidEndDragging
에서 수행하는 간단한 애니메이션이 있습니다. 내 homeLabel
상단에서오고 손가락을 들어 올려 한 후이 애니메이션을 사용animateWithDuration에 바운스 애니메이션을 추가하는 방법은 무엇입니까?
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate {
NSLog(@"finger was lifted");
[UIView animateWithDuration:1.0
animations:^{
self.homeLabel.frame = self.view.frame;
}];
}
, 그리고 난 그래서 정상에서 올 때, 라벨에에게 반송 애니메이션을 추가 할 :
은 다음과 같습니다 , 매끄럽게 착륙하는 대신 멋진 바운스가 될 것입니다. 어떻게 할 수 있습니까? thanksss
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/index.html#//apple_ref/occ/clm/UIView/animateWithDuration:delay:usingSpringWithDamping:initialSpringVelocity:options:animations : 완료 : – Desdenova