gpt4 book ai didi

ios - header 和 refreshcontrol 之间的额外空白

转载 作者:行者123 更新时间:2023-11-28 19:32:50 28 4
gpt4 key购买 nike

我使用 tableview 开发应用程序,用户可以在其中拉动以刷新。

当我下拉表格时,标题和刷新控件之间有额外的空间。

enter image description here

我这样设置 UIRefreshcontrol 和标题背景 viewDidLoad:

- (void)viewDidLoad
{
[super viewDidLoad];
[self getLatestLoans];
self.refreshControl = [[UIRefreshControl alloc] init];
self.refreshControl.backgroundColor = [UIHelper BaseColor];
self.refreshControl.tintColor = [UIColor whiteColor];
[self.refreshControl addTarget:self
action:@selector(getLatestLoans)
forControlEvents:UIControlEventValueChanged];
[self.headerView setBackgroundColor:[UIHelper BaseColor]];
}

如何解决这个问题?

最佳答案

如果您有分组 TableView ,则必须将 TableView 背景颜色设置为蓝色。如果您不这样做,请向我们展示一些代码。

关于ios - header 和 refreshcontrol 之间的额外空白,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42022537/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com