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

提示按钮建议增加设置图片的属性,因为有可能按钮没有文字,只显示图片 #63

Open
firenessZX opened this issue May 29, 2020 · 1 comment

Comments

@firenessZX
Copy link

提示按钮建议增加设置图片的属性,因为有可能按钮没有文字,只显示图片,还有按钮增加阴影相关属性。可以为提示按钮设置阴影效果。

@firenessZX firenessZX changed the title 提示按钮建议增加设置图片的属性,因为有可能按钮没有文字,会显示图片 提示按钮建议增加设置图片的属性,因为有可能按钮没有文字,只显示图片 May 29, 2020
@zhenhuamu
Copy link

提示按钮建议增加设置图片的属性,因为有可能按钮没有文字,只显示图片,还有按钮增加阴影相关属性。可以为提示按钮设置阴影效果。

目前可以重写setupSubviews方法,这样解决

  • (void)setupSubviews{
    [super setupSubviews];
    /// 获取底部按钮,添加背景视图
    for (UIView *subView in self.contentView.subviews) {
    if ([subView isKindOfClass:UIButton.class]) {
    UIButton * button = (UIButton *)subView;
    [button setImage:[UIImage imageNamed:@"certificate_btn_right"] forState:UIControlStateNormal];
    }
    }
    }

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

2 participants