ios - UIRefreshControl默认添加奇怪的插图

标签 ios uitableview uirefreshcontrol

我通过执行以下操作将UIRefreshControl添加到漂亮的默认UITableView中:

iOS SDK 8.1
自我是UITableViewController的实例

UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init];
refreshControl.backgroundColor = [UIColor flatPeterRiverColor];
refreshControl.tintColor = [UIColor whiteColor];
[refreshControl addTarget:self
                   action:@selector(triggerSync)
         forControlEvents:UIControlEventValueChanged];
[self setRefreshControl:refreshControl];

发生了以下情况:

我从未设置过一个奇怪的顶部插图,它仅在设置UIRefreshControl时出现。有谁之前经历过这个吗?我很确定它可以在iOS 7.0中很好地工作。

最佳答案

旧话题,我不知道您是否还在经历,但是对于那些想知道如何解决的人,我找到了一个快速的解决方案。

您只需要在部分中设置标题的高度。
我先尝试用0,但没有结果。

所以我将所有部分都设置为1.0,并且可以正常工作。

希望这个帮助

关于ios - UIRefreshControl默认添加奇怪的插图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26557667/

相关文章:

ios - UIRefreshControl for "Pull Up"刷新?

react-native - 在下拉之前显示 React Native refreshControl

ios - 自定义 UITableViewCell 不显示重新排序控件

ios - ios8 键盘高度有所不同

ios - 保持用户登录(重试 HTTP 请求)

iphone - 如何从 CSV 文件中读取第一列数据并将其与用户输入进行比较?

ios - 使用动态增加的单元格计算 TableView 的内容大小

ios - 如何将我的表格 View 上下颠倒,以便新添加的单元格出现在顶部而不是按钮?

ios - UIRefreshControl 在容器 View 中不起作用

ios - MKPinAnnotationView rightCalloutAccessoryView 在 iOS7 上不发送 calloutAccessoryControlTapped