I can think of some methods, for example by saving each color component as float, pattern image Saving the color can be a bit more complex, but I think you can save the name of the image as a string and insert it into the creation code.
Am I on the right track, otherwise what is the best and most efficient way to do this task normally?
You can change your Then you can convert it to your UPD .: To answer your question in the comments about archiving data, the easiest way is to and then retracting it: UIColor to
NSData And then store it:
NSData * theData = [NSKeyedArchiver archived data object [UIColor blackcolor]];
UIColor object:
UIColor * thecolor = (UIColor *) [NSKeyedUnarchiver UnarchiveObjectWithData: statistics];
NSUserDefaults :
NSData * theData = [NSKEDErchiver stored datahop object: [UIColor blackcolor]]; [[NSUserDefaults Standard Standard Default] Set Object: The Data Fork: @ "Michael"];
NSData * theData = [[NSUserDefaults standard user default] objectfore: @ "Michael"]; UIColor * theColor = (UIColor *) [NSKEEDAmericcier Unavoidable Objective Data: Dadet];
No comments:
Post a Comment