本文介绍了首选大标题和 RefreshControl 效果不佳的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用这个

解决方案

最后对我有用的是:

  • 为了修复RefreshControl进度条大标题消失的bug:

    self.extendedLayoutIncludesOpaqueBars = true

  • 为了修复refreshcontrol.endRefreshing()之后的列表偏移:

    let top = self.tableView.adjustedContentInset.top让 y = self.refreshControl!.frame.maxY + topself.tableView.setContentOffset(CGPoint(x: 0, y: -y), 动画:true)

I am using this tutorial to implement a pull-to-refresh behavior with the RefreshControl. I am using a Navigation Bar. When using normal titles everything works good. But, when using "Prefer big titles" it doesn't work correctly as you can see in the following videos. Anyone knows why? The only change between videos is the storyboard check on "Prefer Large Titles".

解决方案

At the end what worked for me was:

  • In order to fix the RefreshControl progress bar disappearing bug with large titles:

    self.extendedLayoutIncludesOpaqueBars = true
    

  • In order to fix the list offset after refreshcontrol.endRefreshing():

    let top = self.tableView.adjustedContentInset.top
    let y = self.refreshControl!.frame.maxY + top
    self.tableView.setContentOffset(CGPoint(x: 0, y: -y), animated:true)
    

这篇关于首选大标题和 RefreshControl 效果不佳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-23 10:40