본문 바로가기

프로그래밍/아이폰 프로그래밍

8. 애니메이션 사용하기

[UIView beginAnimations:nil context:NULL];

[UIView setAnimationDuration:1.0]; // 애니메이션 동작 시간 : 1.0초

[UIView setAnimationDelegate:self]; // 여기서 구현

[UIView setAnimationCurve:UIViewAnimationCurveEaseOut]; // 서서히 느려짐


// 예제... 이 안에서 객체의 위치,크기,알파 등의 변화가 있으면 저절로 애니메이션이 적용된다.

//.........................................................................

CGAffineTransform transform = CGAffineTransformMakeScale(scale/50, scale/50);

iv.transform = transform;


if(secondOfMinute%10 == 0)

{

[self clearScreen]; // 함수로 써도 가능

}

//..........................................................................


[UIView commitAnimations];