Re: animating addSubview with iOS4

2011-03-05 Thread Matt Neuburg
On Fri, 04 Mar 2011 14:30:12 +0100, Andreas Grosam agro...@onlinehome.de said: So it seems, there is a problem performing UIViewAnimationOptionTransition... animations for the UIView transitionWithView:... class method, and possibly for transitionFromView:... invoked from -viewWillAppear: and

Re: animating addSubview with iOS4

2011-03-04 Thread Andreas Grosam
On Mar 3, 2011, at 8:16 PM, Matt Neuburg wrote: Except that as Robert Vojta told you (and as Luke Hiesterman has clearly stated on other occasions) it is wrong to assume that viewDidLoad means that the view is now in the *interface*, or even that it is *about* to be put into the

Re: animating addSubview with iOS4

2011-03-03 Thread Martin Linklater
Thanks for your replies guys - that makes a lot of sense now 8) On 2 Mar 2011, at 12:06, Andreas Grosam wrote: On Mar 2, 2011, at 12:42 PM, Andreas Grosam wrote: - (void) viewDidLoad { [super viewDidLoad]; // Create the button: // ... [self

Re: animating addSubview with iOS4

2011-03-03 Thread Matt Neuburg
On Thu, 03 Mar 2011 10:32:18 +, Martin Linklater mslinkla...@gmail.com said: Thanks for your replies guys - that makes a lot of sense now Except that as Robert Vojta told you (and as Luke Hiesterman has clearly stated on other occasions) it is wrong to assume that viewDidLoad means that the

Re: animating addSubview with iOS4

2011-03-02 Thread Martin Linklater
Thanks Luke I did manage to find a solution. I was creating and calling the transition from within 'viewDidLoad'. If I move the call to 'transitionWithView' out of 'viewDidLoad' and into a different method the transition works fine. Animating properties work when called from 'viewDidLoad', but

Re: animating addSubview with iOS4

2011-03-02 Thread Robert Vojta
That's because viewDidLoad doesn't mean it's going to be displayed now. It just informs you that view was loaded. You have to use viewWillAppear/viewWillDisappear or any other method where you know that view is visible = you'll see animations. Sent from my iPhone On 2.3.2011, at 10:44, Martin

Re: animating addSubview with iOS4

2011-03-02 Thread Robert Vojta
I meant viewWillAppear/viewDidAppear, not disappear ... Sry ... Sent from my iPhone On 2.3.2011, at 11:36, Robert Vojta rob...@izyapps.com wrote: That's because viewDidLoad doesn't mean it's going to be displayed now. It just informs you that view was loaded. You have to use

Re: animating addSubview with iOS4

2011-03-02 Thread Andreas Grosam
On Mar 2, 2011, at 11:37 AM, Robert Vojta wrote: I meant viewWillAppear/viewDidAppear, not disappear ... Sry ... This might not work also. If the boolean parameter 'animation' in viewWillAppear equals NO, no animation will be started. This is especially true when the view will appear

Re: animating addSubview with iOS4

2011-03-02 Thread Andreas Grosam
On Mar 2, 2011, at 12:42 PM, Andreas Grosam wrote: - (void) viewDidLoad { [super viewDidLoad]; // Create the button: // ... [self performSelector:@selector(addButtonWithAnimation) withObject:nil afterDelay:0.0]; } or - possibly more efficient: - (void)viewDidLoad {

animating addSubview with iOS4

2011-03-01 Thread Martin Linklater
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

Re: animating addSubview with iOS4

2011-03-01 Thread Luke Hiesterman
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