I’m working on a text editor iPhone app where a user can type and save a note with custom font, size, and color. So I have an NSString, UIFont, and a UIColor. I need to store all these in some sort of data structure, but I’m not sure what would be the best method. Currently I’m using an NSMutableArray which writes to a plist for the string, and two other NSMutableArray of custom objects that save to NSUserDefaults on exit. But this is getting way too complicated to manage and debug. Is there any better way to do this?
I’m working on a text editor iPhone app where a user can type and
Share
I would create a custom NSObject subclass, called AttributedText. It would store these values using custom setters and could be retrieved from the data store with custom getters too. You could easily make it save to NSUserDefaults, if you used this custom object.