djBo djBo - 15 days ago 5
iOS Question

Real table component for iPhone

For the last few hours I have been searching high and low for a real table look-a-like component for the iPhone. Unfortunatly I'm still a newbie in iPhone land (more Android myself :P). I haven't found anything yet that comes even close.

There is one example picture I found that exactly describes what I am looking for. Shame that it's made using the iUI html library: (See here)

iTunes styled table

My question of course is wether anyone has ever seen such a table component somewhere. If it weren't for my extreme lack of iPhone knowledge I would have tried to create it myself (as I did on the android lol).

Pointing me in the right direction would seriously help, as this is the last hurdle for finishing the iPhone version of the app I am making.

Answer

Take a look at UITableViewCell customisation - (for example here : http://adeem.me/blog/2009/05/30/iphone-sdk-tutorial-part-6-creating-custom-uitableviewcell-using-interface-builder-uitableview/) but they're all over the Googles.

The easiest way I can think of is to make a custom cell that has an image for the background (including the vertical separator lines) and four UILabels in

You would be able to change the background image depending on if it was the first row (the title), an odd row (white background) or even row (blue). And set the labels' font to be bold for the title row.

Hope that helps.

NB

If you get performance issues scrolling the table (you almost certainly won't) you could look into setting the background color directly on the cell and drawing the lines by hand in drawRect.

Comments