gpt4 book ai didi

ios - 刷新时如何更改 UIRefreshControl 的颜色?

转载 作者:行者123 更新时间:2023-11-29 03:01:24 25 4
gpt4 key购买 nike

我想在 UIRefreshControl 处于“刷新”状态时更改其颜色。它在 iOS 6 上运行良好,但在 iOS 7 上不起作用。

最佳答案

这不是我几个月前在某个地方找到的代码,它对我有用。

CGRect refreshFrame = self.tableView.bounds;
refreshFrame.origin.y = -frame.size.height;
UIView* refreshBackgroundView = [[UIView alloc] initWithFrame:refreshFrame];
refreshBackgroundView.backgroundColor = [UIColor redColor]; //<- Here you choose what colour you want

[self.tableView insertSubview:refreshBackgroundView atIndex:0];

关于ios - 刷新时如何更改 UIRefreshControl 的颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23267817/

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