You can only animate properties documented as "animatable". Try adding your 
subview to its superview with an alpha of 0.0 and then animating the alpha to 
1.0. 

Luke

On Mar 1, 2011, at 8:32 AM, Martin Linklater <mslinkla...@gmail.com> wrote:

> Hi - I'm having trouble getting Core Animation to animate a UIButton 
> appearing on my parent view. My old code did this:
> 
> <create button>
> [self.view addSubview:newButton];
> 
> The button appeared straight away and works fine. Now, I'm trying to animate 
> the appearance of this button and I just can't seem to get it working. 
> Whatever I try the button appears straight away, just like the line above. 
> I've tried numerous snippets of sample code, none of them work. My current 
> code looks like this:
> 
> <create button>
> [UIView transitionWithView:self.view duration:1.0 
> options:UIViewAnimationOptionTransitionCurlUp animations:^{ [self.view 
> addSubview:newButton]; } completion:nil];
> 
> I'm obviously doing something wrong here, can anyone point me in the right 
> direction ?
> 
> Thanks - I'm new to CA, so please bare with me 
> 8)._______________________________________________
> 
> 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/luketheh%40apple.com
> 
> This email sent to luket...@apple.com
_______________________________________________

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