ios - iPhone / Three20: Adding a dynamic list of labels to a tablecell as a subview -


i'm writing iphone app using three20 framework , i'm struggling figure out how can add dynamic list of uilabels table cell.

i've attempted subclass tttabletextitem , tttabletextitemcell in order display dynamic list, i'm having hard time trying write layoutsubviews, setobject , initwithstyle methods.

i've read subclassing here , here , whilst can replicate these simple examples table cells have static number of controls, i've still not had luck attempting recreate number of controls dynamic based on data passed table cell.

the data i'm pulling list of employees, , each employee has nsarray of 1 or more jobs (so cell height needs dynamic, list of labels represent jobs).

each job has name, , colour associated it.

my intention create cells similar following:


cell one

  • "employee one"
  • "job-1 colour label" "job-1 name label"
  • "job-2 colour label" "job-2 name label"
  • ....
  • "job-n colour label" "job-n name"

cell two

  • "employee two"
  • "job-1 colour label" "job-1 name label"
  • "job-2 colour label" "job-2 name label"
  • ....
  • "job-n colour label" "job-n name"

if point me in right direction, that'd appreciated!

from can tell, there isn't easy way i'm after here. @tonklon's suggestion of changing design best option here , did.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -