I’m new to Objective-C and iPhone coding and was hoping someone could help me.
Basically I want a scrollable table that displays a name and a quantity of that item. For example: Apples………2
Oranges……4
Bananas……5
I want the name to be left-justified and the number to be right-justified.
Is there any way to do this with a UITableView or will I need to extend UIScrollView?
Thanks in advance.
Set
cell.textto ‘Apples’. Then create an new UILabel view with the text ‘2’ and assigned it tocell.accessoryView.Text is always on the left, and accessory views are always on the right. Optionally a UIImage in
cell.imagewill be displayed to the left of the cell text if you choose to add one.If you have a cell layout more complicated than that you have to add subviews to your cell manually.