Re: Core animation - Safari Find effect
Re: Core animation - Safari Find effect
- Subject: Re: Core animation - Safari Find effect
- From: Matt Long <email@hidden>
- Date: Wed, 4 Feb 2009 10:53:38 -0700
It's not really clear what you are asking. Your final question is
"Does this sound correct?" to which I would respond, "yes". Though
earlier in the message you ask for advice on the "remaining parts".
It would help if you were to clarify what you mean. When you say "...a
miracle happens...(string within text is highlighted )" it makes it
sound like you've already solved the problem.
So what exactly do you need help with?
-Matt
On Feb 4, 2009, at 5:27 AM, Nick Brandaleone wrote:
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
_______________________________________________
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