I just want to layout a simple table view including a few labels and and image. How hard can it be?
I'm trying to do a tableview on iPhone, in which I have text of an arbitrary length, split into several different labels, next to an image on the left. And I want each row to be uniformly padded at the top and bottom.
My current container hierarchy is thus:
win
-tableview
--tableviewrow
---imageview
---view (layout:vertical, height:auto)
----label
----label
----label
All my labels are height:auto, width:auto, left:0. Nothing else specified.
The problem occurs if I use top/bottom attributes to get the same top/bottom padding in the view which containing the labels.
I'm guessing its some combination of top, bottom, minrowheight, layout etc on either the row, the view or the table (The sheer number of permutations to get it right should probably indicate to the developers that something needs documenting!!)
I can't find a single Q&A which satisfactorily explains what attributes I should be using and in what quantities, which is perplexing as I'd have though presenting a simple table with thumbnails is iphone 101. Is it really that hard to do right?
Thanks in advance for anyone able to contribute.
2 Answers
-
Hi David.
You could try to avoid using "auto". Sometimes ( and it seems in your case it happens) the calculations are not done right.
Could you use pastie to provide some code to see what's there, maybe we'll find a way :) -
hi,
please check this pastie & inform me if u have any douts still
http://www.pastie.org/1099675
Thks & regards…