On Mon, Mar 23, 2009 at 04:37:07PM -0400, Patrick Kedziora wrote:
> I want to display questions and solutions that have text and images and want
> to store them in a SQL lite database. What is the best way to do this?
You almost certainly do not want to store images in the database when you
have access to a filesystem. If you have all the text and images a priori
(i.e. they are to be shipped in the app bundle), just store the names of
the images and use [UIImage imageNamed:]. If you are retrieving them from
the web or getting them from the user, I recommend using
UIImagePNGRepresentation() and storing it with a GUID for the filename
under the ~/Documents directory, then saving that name in the database. You
can retrieve it with [UIImage imageWithContentsOfFile:].
Of course, there is no problem with storing text in SQLite.
> Thanks,
> Patrick
--Greg