아이폰어플개발정보2010. 10. 30. 06:18
[아이폰 앱 개발] Animation: Series of images

Animation: Series of images

Show a series of images in succession
NSArray *myImages = [NSArray arrayWithObjects: [UIImage imageNamed:@"myImage1.png"], [UIImage imageNamed:@"myImage2.png"], [UIImage imageNamed:@"myImage3.png"], [UIImage imageNamed:@"myImage4.gif"], nil]; UIImageView *myAnimatedView = [UIImageView alloc]; [myAnimatedView initWithFrame:[self bounds]]; myAnimatedView.animationImages = myImages; myAnimatedView.animationDuration = 0.25; // seconds myAnimatedView.animationRepeatCount = 0; // 0 = loops forever [myAnimatedView startAnimating]; [self addSubview:myAnimatedView]; [myAnimatedView release];

http://www.iphoneexamples.com/
Posted by 오늘마감

댓글을 달아 주세요

아이폰어플개발정보2010. 10. 30. 02:34
[아이폰 앱 개발] Animation: Move an object

Animation: Move an object

Show something moving across the screen. Note: this type of animation is "fire and forget" -- you cannot obtain any information about the objects during animation (such as current position). If you need this information, you will want to animate manually using a Timer and adjusting the x&y coordinates as necessary.
CABasicAnimation *theAnimation; theAnimation=[CABasicAnimation animationWithKeyPath:@"transform.translation.x"]; theAnimation.duration=1; theAnimation.repeatCount=2; theAnimation.autoreverses=YES; theAnimation.fromValue=[NSNumber numberWithFloat:0]; theAnimation.toValue=[NSNumber numberWithFloat:-60]; [view.layer addAnimation:theAnimation forKey:@"animateLayer"];
http://www.iphoneexamples.com/
Posted by 오늘마감

댓글을 달아 주세요

아이폰어플개발정보2010. 10. 12. 05:53
Animation: Move an object

Animation: Move an object

Show something moving across the screen. Note: this type of animation is "fire and forget" -- you cannot obtain any information about the objects during animation (such as current position). If you need this information, you will want to animate manually using a Timer and adjusting the x&y coordinates as necessary.
CABasicAnimation *theAnimation; theAnimation=[CABasicAnimation animationWithKeyPath:@"transform.translation.x"]; theAnimation.duration=1; theAnimation.repeatCount=2; theAnimation.autoreverses=YES; theAnimation.fromValue=[NSNumber numberWithFloat:0]; theAnimation.toValue=[NSNumber numberWithFloat:-60]; [view.layer addAnimation:theAnimation forKey:@"animateLayer"];
http://www.iphoneexamples.com/

'아이폰어플개발정보' 카테고리의 다른 글

Application Frame얻기  (0) 2010.10.12
A basic UIWebView  (0) 2010.10.12
Animation: Move an object  (0) 2010.10.12
Info button  (0) 2010.10.12
UIView 높이 폭변경  (0) 2010.10.12
user와 인터렉션하는 alert 샘플  (0) 2010.10.12
Posted by 오늘마감

댓글을 달아 주세요