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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to