ios – 使用UISearchBar的stange行为UIRefreshControl

ios – 使用UISearchBar的stange行为UIRefreshControl,第1张

概述我正在使用UIRefreshControl与UISearchBar当我拉动刷新时我看到uiviewcontroller顶部的白色背景 UISearchBar *searchBar =[[UISearchBar alloc] initWithFrame: CGRectMake(0, 0, self.tableView.frame.size.width, 44.0)];searchBar.aut 我正在使用UIRefreshControl与UISearchbar当我拉动刷新时我看到uivIEwcontroller顶部的白色背景

UISearchbar *searchbar =[[UISearchbar alloc] initWithFrame: CGRectMake(0,self.tableVIEw.frame.size.wIDth,44.0)];searchbar.autocorrectionType = UITextautocorrectionTypeNo;self.tableVIEw.tableheaderVIEw = searchbar; _refreshControl = [[UIRefreshControl alloc] init];[_refreshControl addTarget:self action:@selector(update) forControlEvents:UIControlEventValueChanged];[self.tableVIEw addSubvIEw:_refreshControl];

问题是上面的白色背景

有任何想法吗?

解决方法 为表创建一个背景视图,并将其颜色设置为clearcolor,如下所示

- (voID)vIEwDIDLoad {    self.tableVIEw.backgroundVIEw = [UIVIEw new];    self.tableVIEw.backgroundVIEw.backgroundcolor = [UIcolor clearcolor];}
总结

以上是内存溢出为你收集整理的ios – 使用UISearchBar的stange行为UIRefreshControl全部内容,希望文章能够帮你解决ios – 使用UISearchBar的stange行为UIRefreshControl所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1060905.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-25
下一篇2022-05-25

发表评论

登录后才能评论

评论列表(0条)

    保存