뷰 애니메이션 함수입니다. 팝업형식으로 뒤에서 앞으로 튀어나오는 형식이죠.
IBOutlet UIView *cateView1;
cateView1.frame = CGRectMake(0, 0, 0, 0);
cateView1.transform = CGAffineTransformMakeScale(0.1, 0.1);
[cateView1 setAlpha:0.0];
CGContextRef context = UIGraphicsGetCurrentContext();
[UIView beginAnimations:nil context:context];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0.5];
[cateView1 setAlpha:1.0];
cateView1.transform = CGAffineTransformMakeScale(1.0, 1.0);
[self.view addSubview:cateView1];
[UIView commitAnimations];
변형을 해볼까요. 돌면서 앞으로 튀어나오게 하려면
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:cateView1 cache:NO];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
setAnmationTransition 함수를 추가해 줍니다.
Transition 방법은 몇가지가 더 있습니다. 취향에 맞게 사용하시면 되요 ㅋ
UIViewAnimationOptionTransitionNone UIViewAnimationOptionTransitionFlipFromLeft UIViewAnimationOptionTransitionFlipFromRight UIViewAnimationOptionTransitionCurlUp UIViewAnimationOptionTransitionCurlDown UIViewAnimationOptionTransitionCrossDissolve UIViewAnimationOptionTransitionFlipFromTop UIViewAnimationOptionTransitionFlipFromBottom
'IT > iOS' 카테고리의 다른 글
일반 , 레티나 기기 구별하기 (0) | 2012.06.29 |
---|---|
iOS5 Automatic reference counting (0) | 2012.06.19 |
Custom Actionsheet (커스텀 액션쉬트 이미지 넣기) (0) | 2012.06.14 |
앱에서 다른 앱 호출 (0) | 2012.06.13 |
Couldn't register com.yourcompany with the bootstrap server. Error: unknown error code. (0) | 2012.05.24 |
UITextView 줄바꿈 (0) | 2012.05.23 |
MAC에서 특수문자(Special Characters) 입력 (0) | 2012.05.23 |
UITableView cell 추가 및 삭제 (0) | 2012.05.23 |