Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Abraham Sanchez
5,962 PointsSaving UIColor in Core Data
Hi, I'm consuming data from an API and I need to:
1-Download data from API (Done) 2-Save some data downloaded from the API in Core Data (Not yet) 3-Next time I lunch the app, the app have to load data from Core Data and not from API (Not yet)
The problem that I'm actually have it's that I have to save UIColor in Core Data and I don't know which attribute can be an UIColor (String maybe?) and how to save that in Core Data.
Anyone?
Thanks.
3 Answers
Unsubscribed User
6,125 PointsI think, the answer on stackoverflow writes down both options: http://stackoverflow.com/questions/17230720/best-way-to-save-and-retrieve-uicolors-to-core-data
Rashii Henry
16,433 Pointsuse NSUserDefaults to save some files on disk. There should be some youtube videos available to help you or point you in a similar direction.
Abraham Sanchez
5,962 PointsThanks, it work fine for me Dávid Szép !