iOS 7.1 beta5 tableviewcell高度显示其范围之外的对象 [英] iOS 7.1 beta5 tableviewcell height showing objects outside it's range

查看:69
本文介绍了iOS 7.1 beta5 tableviewcell高度显示其范围之外的对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含UITableViewCell列表的应用。默认情况下,单元格设置为某个高度(假设为100)以仅显示一些基本信息。当用户单击一个单元格时,高度将更改为150,以显示之前未见过的更多操作。这在iOS 7.0.0-7.0.5上没有问题。我正在测试运行iOS 7.1 beta 5的iPhone 5s并看到细胞的一些绘图问题。

I have an app that has a list of UITableViewCells. By default, the cells are set to a certain height (lets say 100) to show only some basic information. When the user clicks on a cell the height changes to 150 to show more actions that were previously not seen. This works without a problem on iOS 7.0.0-7.0.5. I'm testing on an iPhone 5s running iOS 7.1 beta 5 and seeing some drawing issues with the cells.

以下是它在iOS 7.0上看起来的样子......这是预期的。折叠单元格时,隐藏位于单元格高度之外的按钮,当单元格展开到高度以显示按钮时,它们是可见的。

Here's how it looks on iOS 7.0... versions which is what is expected. When the cell is collapsed, the buttons that are positioned past the height of the cell are hidden and when the cell is expanded to a height to show the buttons, they are visible.

细胞扩展:

以下是折叠时的单元格:

Cell expanded: The following is the cell when collapsed:

以下是我在iOS 7.1测试版中看到的问题。我很好奇,如果这只是测试版的一个问题,或者我将不得不重新考虑当前如何编码。据我所知,这是自7.1的第一个测试版以来一直存在的。

Here are the issues I'm seeing with iOS 7.1 beta. Im curious if this is just something that is a problem with the beta or if I'll have to rethink how this is being coded currently. As far as I can tell this has been present since the first beta of 7.1.

正如您所看到的,即使单元格已折叠,以前隐藏的按钮现在仍然显示。

As you can see, the button which was previously hidden is now still showing even though the cell is collapsed.

是这是其他人已经看到的测试版的问题,或者现在是这种预期的行为?谢谢你的帮助!

Is this an issue with the beta that anyone else has seen or is this expected behavior now? Thank you for you help!

推荐答案

尝试在你的单元格中设置clipsToBounds = YES,因为它可能是在它之外绘制的。

Try setting clipsToBounds=YES in your cell as it may be drawing outside of it bounds.

cell.clipsToBounds =YES

同时检查单元格高度是否实际折叠。

Also check that the cell height is actually collapsed.

这篇关于iOS 7.1 beta5 tableviewcell高度显示其范围之外的对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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