Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jpeezy

macrumors regular
Original poster
Feb 24, 2010
101
8
Say I have the string "this is a test, this is a test" in a textView. I only want the user to be able to edit the word "test" (both instances) and I need the textView to shrink and grow with what the user enters. I have a method that uses a regex to get the ranges (I'd imagine this isn't optimal, maybe NSScanner would be better?). Anyway, 2 problems I'm having. 1) The ranges need to be adjusted based on what the user enters. 2) ONLY the "test" ranges are editable.

I'm just looking for a bit of guidance in which classes to use. Will I need to use LayoutManager/TextContainers?

Thanks
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.