• 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
Re: transitionWithView:duration:options:animations:completion: still defeats me
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: transitionWithView:duration:options:animations:completion: still defeats me


  • Subject: Re: transitionWithView:duration:options:animations:completion: still defeats me
  • From: Matt Neuburg <email@hidden>
  • Date: Mon, 09 May 2011 12:12:02 -0700

> Date: Mon, 09 May 2011 21:43:38 +0800
> From: Roland King <email@hidden>
> Subject: transitionWithView:duration:options:animations:completion:
> 	still defeats me
>
> I seem to have a lot of trouble with this method! A few months ago I had my own custom drawRect: and that was messing it up, this time I just have a simple UIView with some controls on it, nothing clever. One of the controls is given by the property 'complexity'. What I want is for my UIView to rotate and show up with/without that control. However whatever I have tried all that happens is the control instantly disappears or reappears, no transition at all. Here's the code ..
>
> 	[ UIView transitionWithView:factorsView
> 					   duration:2.0f
> 						options:( UIViewAnimationTransitionFlipFromRight | UIViewAnimationOptionAllowAnimatedContent )
> 					 animations:^{ [ [ factorsView complexity] setHidden:![ [ factorsView complexity ] isHidden ] ]; }
> 					 completion:NULL
> 	 ];
>
> factorsView is the UIView subclass and it's displayed and it's on screen.
>
> I've tried with and without the AllowAnimatedContent option. The factorsView never rotates, it stays right where it is, and the complexity subview just winks in and out of existence.

The key thing is to ask for the factorsView to be redrawn. Otherwise you're not doing anything to it that can trigger animation. In other words, the animation block should consist of [factorsView setNeedsDisplay].

http://www.apeth.com/iOSBook/ch17.html#_view_animation

m._______________________________________________

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: transitionWithView:duration:options:animations:completion: still defeats me
      • From: Roland King <email@hidden>
  • Prev by Date: Re: what should I understand from kAudioQueueProperty_CurrentLevelMeterDB
  • Next by Date: [ANN] NanoStore 2.0 is now available
  • Previous by thread: transitionWithView:duration:options:animations:completion: still defeats me
  • Next by thread: Re: transitionWithView:duration:options:animations:completion: still defeats me
  • Index(es):
    • Date
    • Thread