• 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
Core animation - Safari Find effect
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core animation - Safari Find effect


  • Subject: Core animation - Safari Find effect
  • From: Nick Brandaleone <email@hidden>
  • Date: Wed, 04 Feb 2009 07:27:41 -0500

Hi all,

I am just getting into core animation, and it seems very promising.

I am creating a simple search app, and I want to "highlight" the found word/phrase in a large body of text,
in a similar way that Safari does it (background goes dim, and word is highlighted).


I have the first part done (ie. dimming text), but I am not sure how to proceed with the second (highlight found word).

Here are my steps.  Please advise on the remaining parts.  Thanks!

  - parent view is layer backed (setWantsLayer: YES)
  - create a layer whose content is my text
  - add the text layer as a sublayer to the view
  - fade to zero opacity.

  - ... a miracle happens ... (string within text is highlighted )  ;-)

I assume that I must create a new layer (CAtext), position it in the correct position over the "found word", and animate this new layer (fade in, etc..).

Does this sound correct?

Thanks!

	Nick Brandaleone

_______________________________________________

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: Core animation - Safari Find effect
      • From: Matt Long <email@hidden>
    • Re: Core animation - Safari Find effect
      • From: Ross Carter <email@hidden>
  • Prev by Date: how to get iPhone serial number using UIDevice
  • Next by Date: Re: Advanced NSTextView use
  • Previous by thread: Re: how to get iPhone serial number using UIDevice
  • Next by thread: Re: Core animation - Safari Find effect
  • Index(es):
    • Date
    • Thread