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

继承自QMUICommonViewController的控制中如何修改EmptyView的按钮上文字颜色? #698

Closed
MQL9011 opened this issue Sep 11, 2019 · 2 comments
Labels

Comments

@MQL9011
Copy link

MQL9011 commented Sep 11, 2019

    self.emptyView.actionButtonTitleColor = [UIColor redColor];

这么写了之后我调用

    [self showEmptyViewWithText:@"加载中" detailText:@"" buttonTitle:@"取消" buttonAction:nil];

但是button上文字颜色还是没变呀

@MoLice
Copy link
Collaborator

MoLice commented Sep 19, 2019

QMUICommonViewController 里的 emptyView 是在 showEmptyView 里才被初始化的,所以猜测你调用 self.emptyView.actionButtonTitleColor = [UIColor redColor]; 时 emptyView 为 nil,所以没有效果。

这里确实有使用上的困惑,我们会再考虑如何修改,可关注后续的版本更新日志,在此之前你可以尝试把那两句代码的顺序调换一下。

@MoLice
Copy link
Collaborator

MoLice commented Sep 27, 2019

已发布 4.0.0 版本修复该问题。

@MoLice MoLice closed this as completed Sep 27, 2019
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

2 participants