• 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
animating addSubview with iOS4
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

animating addSubview with iOS4


  • Subject: animating addSubview with iOS4
  • From: Martin Linklater <email@hidden>
  • Date: Tue, 01 Mar 2011 16:32:25 +0000

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 (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: animating addSubview with iOS4
      • From: Luke Hiesterman <email@hidden>
  • Prev by Date: Eviction Policy in NSCache and NSDiscardableContent
  • Next by Date: Re: animating addSubview with iOS4
  • Previous by thread: Eviction Policy in NSCache and NSDiscardableContent
  • Next by thread: Re: animating addSubview with iOS4
  • Index(es):
    • Date
    • Thread