I need to preload some image into my tableView when the app launches. So i am using core data by parsing a .csv file. How can i add those image to .csv file?
Asked
Active
Viewed 526 times
2
-
1CSV is plain text. You could add an URL as string path. – vadian Jun 11 '17 at 16:25
-
So where can i store those image? I don't want to store image on server. – Alamin Jun 11 '17 at 16:27
-
@Alamin This may help You [Image to Base64 String](https://www.freeformatter.com/base64-encoder.html#base64-encoding-explained) – Taras Shpulyar Jun 11 '17 at 16:31
-
@Alamin also this [answer](https://stackoverflow.com/questions/11251340/convert-between-uiimage-and-base64-string#answer-11251478) will be useful for You – Taras Shpulyar Jun 11 '17 at 16:33
-
I need to add image into `.CSV` file. How that answer can help? Please tell me. @TarasShpulyar – Alamin Jun 11 '17 at 17:26
-
1@Alamin As vadian told You : CSV is plain text. You can't store image in it, but You can convert Image to **Base64 String** and store it as plain text and during pre-load - decode from **Base64 String** and have image – Taras Shpulyar Jun 11 '17 at 21:32
-
Thanks @TarasShpulyar . Now i am clear enough. – Alamin Jun 12 '17 at 04:14
-
@Alamin you're welcome :) – Taras Shpulyar Jun 12 '17 at 13:23