ios - Best way to make display sports ranking in a UITableView -


i making iphone app upcoming fifa world cup 2014 , need make "groups & standings" score table. here far have made.

screen shot

and code simple (but not completed yet) :

if (index==0) {     label.text =  [nsstring stringwithformat:@"group - %d", index+1];      uitextview *text1 = [[uitextview alloc] initwithframe:cgrectmake(30, 90, 260, 20)];      text1.text = @"team \t\t mp \t w \t d \t l \t gf \t ga \t pts";     text1.font = [uifont fontwithname:@"arial" size:10];     text1.backgroundcolor = [uicolor clearcolor];     [imgview addsubview:text1];      uilabel *label1 = [[uilabel alloc] initwithframe:cgrectmake(30, 90, 260, 20)];     label1.text = @"label \t one";     label1.backgroundcolor = [uicolor redcolor];     //[imgview addsubview:label1]; }  else if (index==1) {     label.text =  [nsstring stringwithformat:@"group - %d", index+1];     uilabel *label2 = [[uilabel alloc] initwithframe:cgrectmake(50, 100, 200, 20)];     label2.text = @"label two";     label2.backgroundcolor = [uicolor redcolor];     [imgview addsubview:label2]; } 

all data coming xml file hosted in server. not need parsing them using external classes parse data. want know best way develop score board.

my score board this:

team                            mp    w    d    l    gf    ga    pts  [country1.png] argentina        3     3    0    0     7     1     9  [country2.png] korea republic   3     1    1    1     5     6     4  [country3.png] greece           3     1    0    2     2     5     3  [country4.png] nigeria          3     0    1    2     3     5     1 

please note that: these data (numbers , .png images) server , had handled them store in nsmutablearray. need display them shown in above score table , screen shot of simulator have done far.

anyone can tell me best way handle/display data efficiently?

some ideas:

1) search open source spreadsheet or multicolumn class

2) use nsattributedstring tab stops or other fixed spacing each line, text portion. preferred solution, you'll spend time figuring out.

3) create template uitableviewcell subclass, , use uiimageview image on left, 1 uilabel per text item. each item abuts other items on left , right. may find easiest solution.

4) there few html open source classes take html input , generate attributed strings - see cocanetics web site one.

5) turn data html table , render in uiwebview.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -