• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
UIImageView Animation Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UIImageView Animation Question


  • Subject: UIImageView Animation Question
  • From: Philip Vallone <email@hidden>
  • Date: Wed, 25 Nov 2009 18:36:22 -0500

Hi,

I have a UIImageView that overlays a MPMoviePLayerController. When the movie plays, the view is in landscape. I want to have my overlay image to drop from the top of the movie and move down. The below code rotates the image. How do I get this effect?


- (void)showOverlay:(NSTimer *)timer {

	NSArray *windows = [[UIApplication sharedApplication] windows];

	UIImage *image = [UIImage imageNamed:@"top.png"];
	UIImageView *imageView = [ [ UIImageView alloc ]  initWithFrame:CGRectMake(0.0, 0.0, image.size.width, image.size.height) ];
	imageView.image = image;
	imageView.transform = CGAffineTransformMakeRotation(M_PI/2.0);



	CGFloat moveDistance = -50.0;
	CGContextRef context = UIGraphicsGetCurrentContext();
	[UIView beginAnimations:@"moveImageDown" context:context];
	[UIView setAnimationDuration:1.0];
	CGAffineTransform transform = CGAffineTransformMakeTranslation(0, moveDistance);
	[imageView setCenter:CGPointMake(295, 480 / 2  )];
	imageView.transform = transform;
	[UIView commitAnimations];



	mpw = [windows objectAtIndex:1];
	[mpw addSubview:imageView];

}

Thanks

Phil


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: UIImageView Animation Question
      • From: Philip Vallone <email@hidden>
  • Prev by Date: Re: EXC_BAD_ACCESS when calling NSOpenPanel
  • Next by Date: Re: NSOutlineView - How to hide disclosure triangle for root nodes ?
  • Previous by thread: table view header cell bottom border
  • Next by thread: Re: UIImageView Animation Question
  • Index(es):
    • Date
    • Thread