Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

历史记录清空按钮显示bug #186

Open
Tiger9527 opened this issue Aug 27, 2018 · 11 comments
Open

历史记录清空按钮显示bug #186

Tiger9527 opened this issue Aug 27, 2018 · 11 comments
Labels

Comments

@Tiger9527
Copy link

在没有热门搜索的情况下,初始化搜索vc,历史记录清空按钮不显示,取消后显示
screen shot 2018-08-27 at 2 39 58 pm
screen shot 2018-08-27 at 2 40 08 pm

@chenzenghui2013
Copy link

我也遇到这个问题
不知道如何修改

@ko1o
Copy link
Owner

ko1o commented Nov 1, 2018

@Tiger9527 @chenzenghui2013 更新到最新版试试 我这边测试没问题

@XiaoYiS
Copy link

XiaoYiS commented Nov 27, 2018

第一次present进去之后,emptyButton不显示,当搜索过后(点击或者输入)再回到搜索页面才会显示呢, @ @ko1o ,最新版本

@XiaoYiS
Copy link

XiaoYiS commented Nov 28, 2018

@chenzenghui2013 @Tiger9527 @ko1o 这个解决了吗,支一招呗

@ko1o
Copy link
Owner

ko1o commented Jan 8, 2019

@XiaoYiS @chenzenghui2013 @Tiger9527 试试最新版哈 如果还是不行的话,直接加我QQ:499491531

@GongCheng12138
Copy link

最新版还是没有用啊 老哥

@ko1o ko1o added the bug label Apr 25, 2019
@ko1o
Copy link
Owner

ko1o commented Apr 25, 2019

@GongCheng12138 @Tiger9527 @chenzenghui2013 @XiaoYiS 我这边用最新版测试是没问题的 麻烦检查下是不是最新版 最好是 直接使用clone 下载项目 测试

@liuliangju
Copy link
Contributor

还是有问题 @ko1o

@lizhongkan
Copy link

也是发现,还是存在这个问题。iOS 13测试。

@lizhongkan
Copy link

发现emptyButton在创建的时候,searchHistoryView,headerView还没有创建,导致emptyButton没有添加成功。
创建PYSearchViewController sc时,重置一次:
if (!sc.emptyButton.superview) {
sc.emptyButton = nil;
}

@gaoqh
Copy link

gaoqh commented Oct 13, 2021

我在懒加载searchHistoryView和emptyButton方法里,都添加了父控件的判断
if (!_searchHistoryView && self.headerView) {
UIView *searchHistoryView = [[UIView alloc] init];
searchHistoryView.py_x = self.hotSearchView.py_x;
searchHistoryView.py_y = self.hotSearchView.py_y;
searchHistoryView.py_width = self.headerView.py_width - searchHistoryView.py_x * 2;
searchHistoryView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
[self.headerView addSubview:searchHistoryView];
_searchHistoryView = searchHistoryView;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants