首页 > 解决方案 > iOS - 大标题隐藏了我的身体顶部

问题描述

我的导航栏有一些问题。实际上,这是一个很大的标题,它覆盖了我的ViewController. 我认为视频将帮助您理解问题:https ://vimeo.com/284493905

标签: iosswiftnavigationcontroller

解决方案


当您推送到新的视图控制器时,像这样滚动到顶部:

yourTableView.setContentOffset(.zero, animated: true)

或者

let indexPath = IndexPath(row: 0, section: 0)
yourTableView.scrollToRow(at: indexPath, at: .bottom, animated: animated)

推荐阅读