- Sep 13, 2001
- 53,640
- 6,522
- 126
So I'm working on a new app that has some custom cells I created, and they are based off of a previous app I wrote.
In my previous app, the cells had 3 parts stacked on top of eachother.
- UITextLabel
- UIImageView
- UITextLabel
It worked fine for everything I needed to do with it.
Now in my new app I want to have a very similar style, except where the UIImageView is, I want to be able to have as many images as I want in that portion of the cell.
The reason is because I want to dynamically add small image icons in there based on the data parsed from the xml.
For instance, in my old app, I had one image name that was 'rgb' and when the app loaded it up, it would load up the 'rgb.gif' into the UIImageView portion of the cell. It would show 3 circles, red, green, and blue. However, I also had a name that was 'rg' so when parsed, it would load up 'rg.gif' and it was a gif with a red and green circle.
Now in my new app I'm trying to make it more dynamic, where I can put something like 'r,g,b' in there, and when parsed, i can load up r.gif, g.gif, and b.gif, and just place them all next to eachother in that part of the cell. As you can see, this way I can only have 3 .gif images, and make as many combinations as I would like in any order of circles in that portion of the cell.
Does anybody know how this can be done for iOS, or if it's even possible? If this does not make sense, I can try to clarify it for you a little bit more.
In my previous app, the cells had 3 parts stacked on top of eachother.
- UITextLabel
- UIImageView
- UITextLabel
It worked fine for everything I needed to do with it.
Now in my new app I want to have a very similar style, except where the UIImageView is, I want to be able to have as many images as I want in that portion of the cell.
The reason is because I want to dynamically add small image icons in there based on the data parsed from the xml.
For instance, in my old app, I had one image name that was 'rgb' and when the app loaded it up, it would load up the 'rgb.gif' into the UIImageView portion of the cell. It would show 3 circles, red, green, and blue. However, I also had a name that was 'rg' so when parsed, it would load up 'rg.gif' and it was a gif with a red and green circle.
Now in my new app I'm trying to make it more dynamic, where I can put something like 'r,g,b' in there, and when parsed, i can load up r.gif, g.gif, and b.gif, and just place them all next to eachother in that part of the cell. As you can see, this way I can only have 3 .gif images, and make as many combinations as I would like in any order of circles in that portion of the cell.
Does anybody know how this can be done for iOS, or if it's even possible? If this does not make sense, I can try to clarify it for you a little bit more.