Re: iPhone animation puzzle
Re: iPhone animation puzzle
- Subject: Re: iPhone animation puzzle
- From: Roland King <email@hidden>
- Date: Sun, 20 Mar 2011 08:08:57 +0800
UIViewAnimationOptionAllowUserInteraction ?
On Mar 20, 2011, at 5:42, David Rowland <email@hidden> wrote:
> This works. It fades the label to invisibility.
>
> label.alpha = 1.0;
> [UIView beginAnimations:nil context:nil];
> [UIView setAnimationDuration:2.5];
> label.alpha = 0;
> [UIView commitAnimations];
>
>
> and so does this,
>
> label.alpha = 1.0;
> [UIView animateWithDuration:2.5 animations:^{label.alpha = 0.0;} ];
>
>
> The documentation says the latter is now preferred and does the same thing as the former. In particular, both will
> start a separate thread for the animation.
>
> My problem is that the second method seems to block the main thread. While it is acting I cannot use any of the controls on the screen. The first method lets me do what I wish as it proceeds.
>
>
> Anyone have advice?
>
> thanks,
>
> David
>
> _______________________________________________
>
> 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
_______________________________________________
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