I have an array of UIImages, how to I save them in sq开发者_StackOverflowlite3 database ?
@Veer it is upto you you that how you want to save them to the Sqlite database
as Parth told you before you have two options have a look on them below
Saving images in the database as BLOB datatype.
Saving images name in the database as String datatype.
Now you have both the options with you........and as you are asking about that you have array of UIImages
,and you want to save them in sqlite3 database then i suggest you to choose second one and save the images name by separation of (,)
in same field and fetch them
accordingly.
Hope you got my point....Good Luck!
For saving images into Sqlite database, there are two options:
FIRST OPTION
You can put your images in Resources folder or may be app's Documents Directory and just save the image names as TEXT datatype in Sqlite.
SECOND OPTION
You can convert your images to NSData format and save it as BLOB datatype in Sqlite.
As such, First option is more feasible, if number of images is more.
Hope this helps you.
精彩评论