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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to