Search code examples
cocoa-touchuiviewuitableviewxcode4

UIView in Cell.Content


I'm using xCode 4, how can I add a view as shown in the following image to a cell.content? Because I couldn't format the cell.textLabel.text to have always a specific position.

http://i.imm.io/7kZb.jpeg

Moreover, I want to do the same for the label in the viewForHeaderInSection.

Thanks in advance, regards.


Solution

  • Hey Zigny you should create a custom cell, instead of trying to "hack" the default one. You could use this tutorials:

    http://iosdevelopertips.com/user-interface/creating-unique-looking-tables-with-custom-cells.html

    http://blog.webscale.co.in/?p=284

    http://iphone.zcentric.com/2008/08/05/custom-uitableviewcell/