iOS 8灰色框在UITableView [英] iOS 8 gray box over UITableView
本文介绍了iOS 8灰色框在UITableView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在做一个应用程序,我需要使用 UITableView
以有组织的方式显示内容,但从我更新到iOS 8和Xcode 6,我一直在一个神秘的灰色框在几乎整个视图。这可以在下面的图像中看到。这不会发生在每个 UITableView
,只是一些(没有明显的模式)。
I am making an app where I need to use UITableView
s to display content in an organized fashion, but since I updated to iOS 8 and Xcode 6 I have been getting a mystery gray box over almost the entire view. This can be seen in the image below. This does not happen on every UITableView
, just some (with no apparent pattern).
推荐答案
在 iOS 8
中,您必须在 UITableView
的委托中指定高度: / p>
In iOS 8
, you must specify a height in the UITableView
's delegate:
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return 44.0;
}
在 iOS 7
和更早,接受默认值。有关详情,请参见此链接。
In iOS 7
and earlier, a default was accepted. See this link for more information.
这篇关于iOS 8灰色框在UITableView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文