Best way to make display sports ranking in a UITableView

I am making an iPhone App for upcoming FIFA world cup 2014 and need to make "Groups & Standings" score table. Here is so far I have made.

And the code for this is 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 the data will be coming from XML file hosted in my server. I do not need to parsing them as I will be using external classes to parse data. I only want to know what would be the best way to develop this score board.

My score board will be something like 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: all these data (numbers and those .png images) are from server and I already had handled them to store in an NSMutableArray. I just need to display them as shown in the above score table and the screen shot of the simulator is what I have done so far.

Anyone can tell me the best way to handle/display those data efficiently?


Some ideas:

1) search for an open source spreadsheet or multicolumn class

2) use an NSAttributedString with tab stops or other fixed spacing for each line, the text portion. This would be my preferred solution, but you'll spend some time figuring it out.

3) create a template UITableviewCell subclass, and use a UIImageView for the image on the left, then one UILabel per text item. Each item abuts other items on the left and right. You may find this the easiest solution.

4) there are a few HTML open source classes that take HTML input and generate attributed strings for you - see Cocanetics web site for one.

5) turn your data into an HTML table and render it in a UIWebView.

Need Your Help

ASP.NET Menu click zone menu

I am experimenting with the ASP.NET menu control and have it mostly the way I want, with one exception. When I click on the text of a menu item, I am correctly redirected to the page that the menu...

Eclipse diff viewer to use as standalone application

eclipse diff

Is that possible to use Eclipse as standalone application