뷰를 다른 것으로 슬라이드하는 애니메이션을 만들려고합니다. 특정 시점에 도달하면 액션을 호출해야합니다. 아마존의 스크린 샷을보십시오. 당신의 요구 사항에 따라 amazon pic 2iOS 목적에서 슬라이드 애니메이션을 만드는 방법 amazon ios 앱에서 다른 것 위에 뷰를 슬라이드하는 방법
1
A
답변
0
몇 가지 더 많은 사용자 정의 및 요구 사항 이상 달성해야 GitHub의에서 컨트롤을 사용할 준비가 있습니다.
손 컨트롤 아래에 확인하시기 바랍니다 :이 의지 할 수
https://xcodenoobies.blogspot.in/2011/03/how-to-do-slide-to-unlock.html
https://github.com/mattlawer/MBSliderView
https://www.cocoacontrols.com/controls/slide-to-unlock
희망을.
1
당신의 UIView의 애니메이션 블록을 사용할 수 있습니다
... 스위프트 언어에서
[UIView animateWithDuration:0.3 animations:^{
//Do your stuff here...
} completion:^(BOOL isFinished){
}];
0
, 당신은 다음과 같이 몇 가지 사소한 사용자 정의하여 사용자 정의 애니메이션을 만들 수 있습니다
let left = CGAffineTransformMakeTranslation(-200, 0)
let right = CGAffineTransformMakeTranslation(200, 0)
let top = CGAffineTransformMakeTranslation(0, -200)
UIView.animateWithDuration(0.4, delay: 0.0, options: [], animations: {
// Add the transformation in this block
// self.container is your view that you want to animate
self.container.transform = top
}, completion: nil)