프로그래밍 놀이터/iOS
[ios/tutorial] Implicit Animation
돼지왕 왕돼지
2017. 11. 28. 08:30
반응형
[ios/tutorial] Implicit Animation |
-
View 에 붙어 있지 않은 Layer property 들은 기본적으로 implicit animation 을 한다.
-
Implicit Animation 을 끄려면 다음과 같이 한다.
[CATransaction begin];
[CATransaction setValue:[NSNumber numberWithBool:YES] forKey:kCATransactionDisableActions];
// property setting
[CATransaction commit];
-
아래와 같은 코드로 View 에 붙어있는 Layer 에도 Implicit animation 을 줄 수 있다.
또한 standalone animation 의 implicit animation 설정을 바꿀 수도 있다.
CATransaction.Begin();
CATransaction.AnimationDuration = 2;
// animationTimingFunction, completionBlock 등도 설정할 수 있다.
// property setting
CATransaction.Commit();
[ios/tutorial] Implicit Animation 없이 property 값 바꾸기 -> View Level 에 대한 이야기
반응형