使用UITableView单元设计问题 [英] Design issues with UITableView cells

查看:108
本文介绍了使用UITableView单元设计问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的表格视图存在一些设计问题。下面是我的最终结果应该是什么样子的图像(对不起,新用户因此无法显示图像或超过两个超链接)。

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

以下是目前的情况:

http://casperslynge.dk/iphone1.png

我可以'使我的视图在我的xib文件(附加到TableViewCell)中填充整个窗口(宽度或高度)。如果我将宽度设置为320,则如上图所示。它从单元格的开头(左上角)开始。如何更改?

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?

在按下单元格时激活的下一个UITableView中,没有问题(见下图),但没有任何变化在两个表视图控制器中的代码中。

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)

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

最后我想插入从Abonnementer图片到我的SelskaberTableView的细胞,就像一个下拉菜单(见最后一张图)。这可能吗?

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)

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

谢谢。

推荐答案

如果你的表格视图是分组的样式,那么这可能会在你的第二张图片中产生结果,虽然这很难分辨,因为它都是非常定制的。

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.

我假设您的单元格的xib有一个视图,您希望填充单元格的整个框架?这可以通过在界面构建器中设置原点和框架设置来实现。

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"

这篇关于使用UITableView单元设计问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆