破损的电池有奇数删除线吗? [英] Broken cell with an odd strikethrough?

查看:77
本文介绍了破损的电池有奇数删除线吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个奇怪的问题,一个特定的UITableView在我的iPhone devel的体验在这里。如果你看下面的截图:

I'm having a weird issue with a particular UITableView in my iPhone devel experience here. If you look at the following screenshot:

您会注意到通过Jane Aba单元格中间的罢工。

you'll notice a strike through going through the middle of the 'Jane Aba' cell.

任何想法可能导致这种奇怪的图形显示?

Any idea what might be causing this odd graphic display? It's true for both the simulator and for the actual device running 2.2 SDK.

根据请求,这里是我的 -tableView:cellForRowIndexPath:方法:

As requested, here's my -tableView:cellForRowIndexPath: method:

* EDIT *

问题。我不完全确定为什么这是问题,但它是。在我的RootViewController中,我在 -initWithCoder:方法中有以下代码:

I've located the problem. I'm not entirely sure why this is the problem, but it is. In my RootViewController, I have the following line of code in my -initWithCoder: method:

self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent;

当我注释掉时,单元格(不在RootViewController中,它解决了。任何想法为什么会是这种情况?

When I comment that out, the cell (which is not in the RootViewController, but a secondary controller) it's resolved. Any idea why this might be the case?

推荐答案

我有一个类似的问题。对我来说,单行是由一个多余的视图造成的,但是从来没有确定大小或放置正确,所以是1像素高,漂浮在一切。您也可以通过混淆UINavigationController关于它的一组子视图(通过直接添加视图到其布局容器)导致这种情况。

I've had a similar problem. For me, the single line was caused by a superfluous view that was created but never sized or placed correctly and so was 1 pixel high, floating over everything else. You can also cause this by confusing a UINavigationController about its set of subviews (by adding views directly to its layout container).

查看您的UI(xib文件并以编程方式创建视图),用于不应该存在或者不被使用的视图。编写一些代码来转储UI层次结构可能会有帮助,因此您可以看到哪些视图位于哪里。

Look through your UI (xib files and programmatically created views) for a view that shouldn't be there or is otherwise not being used. It might be helpful to write some code to dump a UI Hierarchy, so you can see what views are where.

这篇关于破损的电池有奇数删除线吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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