在iOS 8上选择时,表视图单元格跳转 [英] Table View Cells jump when selected on iOS 8

查看:68
本文介绍了在iOS 8上选择时,表视图单元格跳转的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试更新我的iOS 8应用程序和一个奇怪的问题,我无法弄清楚每当我按下一个表视图单元格(在分组表视图上)并将另一个视图控制器推送到导航控制器,表视图的所有单元格跳转。它有点像它们都会降低它们的高度。

I'm trying to update my apps for iOS 8 and one strange issue that I can't figure out is that whenever I press a table view cell (on a grouped table view) and push another view controller on to the navigation controller, all the cells of the table view jump. It's sort of like they all reduce their height a little bit.

因此,当弹出导航堆栈并返回原始表格视图屏幕时,单元格会再次跳转,这一次,他们增加了他们的身高,并回到原来的状态。

Consequently, when popping the navigation stack and coming back to the original table view screen, the cells jump again, this time they increase their height and going to back to how they were originally.

我尝试过使用UITableViewController,进行自己的表视图管理,不使用明确的部分高度,删除所有自定义标题视图和框架,基本上是我能想到的任何东西。

I have tried using a UITableViewController, doing my own table view management, not using explicity section heights, removing all custom header views and frames, basically anything I could think of.

所有iOS 8模拟器和运行iOS 8 iPhone和iPad的实际设备上都会发生这种情况。

It's happening on all the iOS 8 emulators and on actual devices runnings iOS 8 both iPhones and iPads.

任何建议都会有所帮助。

Any suggestions will really help.

编辑:删除视频

推荐答案

好吧,如果你'重新使用默认的 UITableViewCell 并为 textLabel detailTextLabel ,请确保为表视图设置 rowHeight 或实现其中一个 UITableViewDelegate 方法,例如 tableView:estimatedHeightForRowAtIndexPath:

Alright, so if you're using the default UITableViewCells and setting custom fonts for the textLabel and detailTextLabel, make sure you either set rowHeight for the table view or implement one of the UITableViewDelegate methods for e.g. tableView:estimatedHeightForRowAtIndexPath:

相同的代码在早期版本的iOS上运行良好,但需要在iOS 8上修复因为某些原因。

The same code has worked fine on earlier versions of iOS, but needs fixing on iOS 8 for some reason.

这篇关于在iOS 8上选择时,表视图单元格跳转的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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