简体   繁体   English

iOS 7 TableViewController单元格无法完全显示

[英]ios 7 TableViewController cells cannot be shown completely

I tried to update one of my IOS6 app to IOS7 using Xcode 5 GM which was just released couple of days ago. 我尝试使用几天前发布的Xcode 5 GM将我的IOS6应用程序之一更新为IOS7。

One of the main problem I met is that some of the table views (UITableViewController) cannot be shown correctly anymore after being recompiled by IOS7 SDK: 我遇到的主要问题之一是,某些表视图(UITableViewController)在被IOS7 SDK重新编译后无法正确显示:

Some of them cannot shown the last cells completely: You can see half of the last cell right there, but cannot scroll down to see full of it; 其中一些无法完全显示最后一个单元格:您可以在此处看到最后一个单元格的一半,但不能向下滚动以查看全部内容; some others cannot show the first cells completely: half of the cells was hide and you need to draw down the table view to see it. 其他一些则无法完全显示第一个单元格:一半的单元格是隐藏的,您需要绘制表格视图才能看到它。

BTW, those problematic tableViewControllers are all embedded in tab bar controllers. 顺便说一句,那些有问题的tableViewControllers都嵌入在标签栏控制器中。

Could anybody help me with this? 有人可以帮我吗? Thanks. 谢谢。

UPDATE: 更新:

I tried several ways, and here's my solution: 我尝试了几种方法,这是我的解决方案:

  1. Delete the tab bar controllers, and add them back through editor->embed in->tab bar controller (I tried to drag out a tab bar controller from the object library directly, but that didn't fix the problem. Don't know why). 删除选项卡栏控制器,然后通过editor-> embed in->选项卡栏控制器将它们重新添加(我试图直接从对象库中拖出一个选项卡栏控制器,但这并不能解决问题。不知道为什么)。

  2. Re-link other view controllers to this new tab bar controller and run the app. 将其他视图控制器重新链接到此新的标签栏控制器,然后运行该应用程序。 Now, you probably see the first cell still cannot be show completely as I described before, but the last one can be shown correctly. 现在,您可能会看到第一个单元格仍然无法像我之前描述的那样完全显示,但是最后一个单元格可以正确显示。

  3. Go back to storyboard, select the tab bar controller and deselect "under top bars" in the attributes inspector. 返回情节提要,选择选项卡栏控制器,然后在属性检查器中取消选择“顶部栏下面”。 Run it again, everything works fine, at least for me. 再次运行,一切正常,至少对我而言。

I think it's not a bug but rather a UI design as intended. 我认为这不是错误,而是预期的UI设计。 As you can see the overlap of Tabbar still have some see through effect. 如您所见,Tabbar的重叠部分仍然具有透视效果。

As I dont want to resize my table view to fit specific above the Tabbar. 因为我不想调整表格视图的大小以适合Tabbar上方的特定视图。 Workaround with last cell bottom padding or add in extra last cell with same height as Tabbar? 解决最后一个单元格底部填充或添加额外的最后一个单元格与Tabbar高度相同的方法?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM