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

设置showPageControl = NO无效 #718

Open
zfy199466 opened this issue Jul 13, 2022 · 4 comments
Open

设置showPageControl = NO无效 #718

zfy199466 opened this issue Jul 13, 2022 · 4 comments

Comments

@zfy199466
Copy link

我在UICollectionReusableView添加了一个banner控件。我在awakeFromNib设置下面的代码,但是pagecontrol还是会显示。根本不会隐藏,请问是什么原因呢?
self.bannerView.showPageControl = NO;
self.bannerView.pageControlStyle = SDCycleScrollViewPageContolStyleNone;

@zfy199466 zfy199466 changed the title 设置showPageControl = YES无效 设置showPageControl = NO无效 Jul 13, 2022
@chinaiOSSwift
Copy link

chinaiOSSwift commented Jul 13, 2022 via email

@biyuhuaping
Copy link

biyuhuaping commented Aug 24, 2022

我也遇到了同样的问题。因为是用xib吗?我在awakeFromNib设置的代码,通过视图层级查看,发现pagecontrol是在图片的下面一层,被遮挡住了。

@gsw1
Copy link

gsw1 commented Jul 7, 2023

SDCycleScrollView 里 awakeFromNib 方法换成 initWithCoder, awakeFromNib 执行较晚 会将 pageControlStyle 重新赋值。showPageControl 赋值 放在 pageControlStyle 或者 放在设置图片数据源之后, 这时_pageControl 才被赋值

@chinaiOSSwift
Copy link

chinaiOSSwift commented Jul 7, 2023 via email

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

No branches or pull requests

4 participants