I'm just wondering how I can make a copy of an NSMutableAttributedString
. I have a property called text
that I'd like to save its contents at a certain point and revert back to it in case something happens. I've tried making a property called textCopy
where I can save it to with @property (nonatomic, copy)
but I get a runtime error when I do this:
-[NSConcreteAttributedString insertAttributedString:atIndex:]: unrecognized selector sent to instance.
How would I accomplish this?
Updated with run time error. I'm getting this anytime I set the NSMutableAttributedString to @property (nonatomic, copy)
. Not understanding why this wouldn't work, in general the copy paramter doesn't seem to work with NSMutableAttributedString whether I'm using its setter method or not.