• 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: The simplest way to fade out a view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The simplest way to fade out a view


  • Subject: Re: The simplest way to fade out a view
  • From: Chase Latta <email@hidden>
  • Date: Fri, 20 May 2011 12:08:04 -0700

> How could i force the animation to actually change the alpha value
> from 1.0 to 0.0 and make it stay 0.0 unless i change it back?

Change your code to look like this:

CABasicAnimation * alphaAnimation  = ...
 ...
    [[theView layer] setOpacity:0.0];  // Set your opacity here
    [[theView layer] addAnimation:alphaAnimation forKey:@"opacity"];
// Note the key
}

By setting the key to @"opacity" instead of @"opacityAnimation" your
animation will used instead of the default animation when you call
[CALayer setOpacity:].

There is a good WWDC talk about animation on the ipad that addresses
this.  I don't remember the exact talk, though.

Chase
_______________________________________________

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: The simplest way to fade out a view
      • From: Nick <email@hidden>
References: 
 >The simplest way to fade out a view (From: Nick <email@hidden>)
 >Re: The simplest way to fade out a view (From: Quincey Morris <email@hidden>)
 >Re: The simplest way to fade out a view (From: Gustavo Pizano <email@hidden>)
 >Re: The simplest way to fade out a view (From: Quincey Morris <email@hidden>)
 >Re: The simplest way to fade out a view (From: Nick <email@hidden>)
 >Re: The simplest way to fade out a view (From: Quincey Morris <email@hidden>)
 >Re: The simplest way to fade out a view (From: Nick <email@hidden>)
 >Re: The simplest way to fade out a view (From: Chase Latta <email@hidden>)
 >Re: The simplest way to fade out a view (From: Gustavo Pizano <email@hidden>)
 >Re: The simplest way to fade out a view (From: Nick <email@hidden>)
 >Re: The simplest way to fade out a view (From: Quincey Morris <email@hidden>)
 >Re: The simplest way to fade out a view (From: Nick <email@hidden>)
 >Re: The simplest way to fade out a view (From: Gustavo Pizano <email@hidden>)
 >Re: The simplest way to fade out a view (From: Nick <email@hidden>)

  • Prev by Date: Re: XML Resource Release
  • Next by Date: Re: The simplest way to fade out a view
  • Previous by thread: Re: The simplest way to fade out a view
  • Next by thread: Re: The simplest way to fade out a view
  • Index(es):
    • Date
    • Thread