Design issues with UITableView cells

穿精又带淫゛_ 提交于 2019-12-11 08:47:47

问题


Have some design issues with my Table View. Below is an image of what my end-result should look like (Sorry, new user so can't display images or more than two hyperlinks).

http://casperslynge.dk/2.png

And below is what it looks like at the moment:

http://casperslynge.dk/iphone1.png

I can't make my view in my xib file (attached to a TableViewCell) fill the entire window (width or height). If I set the width to 320 it looks like the picture above. It starts at the beginning of the cell (top left side). How can I change this?

In the next UITableView which is activated when pressing a cell, there is no problem (see picture below), but there isn't any change in code in the two Table View Controllers.

(http://casperslynge.dk/iphone2.png)

Finally I have a desire to insert the cells from the "Abonnementer" picture into my "Selskaber" TableView, like a drop down menu (see last picture). Is this possible?

(http://casperslynge.dk/3.png)

Thanks.


回答1:


If your table view is of the grouped style then this may produce the results in your second image, though it's hard to tell because it's all very customised.

I'm assuming your xib for the cell has a view on it that you wish to fill the whole frame of the cell? This is possible by setting the origin and frame settings in interface builder.

Inserting a drop down menu in a table view isn't really conventional design but you can reconfigure a cell to grow if you select a certain control, then add subviews to it - this is not a straightforward process and should probably be asked as a separate question.

You set the grouped / plain style here. This table is "grouped" style.

Looking at your screenshot I am sure this is what you have. You can see the rounded corners in the background.

If you do stick with the grouped style, you can clip to the rounded corners by choosing the cell in interface builder, and then selecting "Clip to bounds"



来源:https://stackoverflow.com/questions/7476330/design-issues-with-uitableview-cells

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!