Hi David,
Thanks for the reply. When I remove the reference to
UIGraphicsGetCurrentContext() my Image doesn't drop in.
Removed:
CGContextRef context = UIGraphicsGetCurrentContext();
[UIView beginAnimations:@"moveImageDown" context:context];
The following code works:
imageView = [ [ UIImageView alloc ] initWithFrame:CGRectMake(295,
480/2, image.size.width, image.size.height) ];
imageView.image = image;
imageView.transform = CGAffineTransformMakeRotation(M_PI/2.0);
imageBottomView = [ [ UIImageView alloc ]
initWithFrame:CGRectMake(-220, 207, imageBottom.size.width,
imageBottom.size.height) ];
imageBottomView.image = imageBottom;
imageBottomView.transform = CGAffineTransformMakeRotation(M_PI/2.0);
pos = 295;
CGContextRef context = UIGraphicsGetCurrentContext();
[UIView beginAnimations:@"moveImageDown" context:context];
[UIView setAnimationDuration:2.0];
[imageView setCenter:CGPointMake(pos, 480 / 2 )];
[UIView commitAnimations];
[mpw addSubview:imageView];
Thoughts?
On Nov 26, 2009, at 1:13 PM, David Duncan wrote:
> On Nov 25, 2009, at 3:49 PM, Philip Vallone wrote:
>
>> CGContextRef context = UIGraphicsGetCurrentContext();
>> [UIView beginAnimations:@"moveImageDown" context:context];
>> [UIView setAnimationDuration:1.0];
>> [imageView setCenter:CGPointMake(295, 480 / 2 )];
>> [UIView commitAnimations];
>
>
> Keep in mind that the call to UIGraphicsGetCurrentContext() here is
> superfluous, and likely returning NULL. You can remove it without making any
> change on the behavior of your code.
> --
> David Duncan
> Apple DTS Animation and Printing
>
_______________________________________________
Cocoa-dev mailing list ([email protected])
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 [email protected]