Core animation - Safari Find effect
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