Ok, I am running into a problem and I must be missing something simple. I am trying to 'copy' the text from a UITextView into a string to make a "backup" of the data. Then I manipulate the data in the textview and if the user doesnt like it they can revert back to the original data. The problem is that when I try and set the data of the textview back to the copy I made, the copy is now the same changed data that the textview has. How can I make a true copy of the data?
I have tried many things, here is one example:
The problem is that originalText has been changed and holds the manipulated data. Any ideas??
Thanks
I have tried many things, here is one example:
Code:
originalText = [NSString stringWithFormat:@"%@", [textView text]];
[originalText retain];
......
processing of the textView text
......
......
User wants to revert back to original text
......
textView.text = [NSString stringWithFormat:@"%@", originalText];
The problem is that originalText has been changed and holds the manipulated data. Any ideas??
Thanks