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

相对布局时,设置宽度为.wrap的UILabel,其他视图参照Label的高度设置高度时,高度设置无效 #25

Closed
changelee82 opened this issue Jun 8, 2018 · 1 comment

Comments

@changelee82
Copy link

    如下代码,根据label的高度设置view的高度,正确的结果是红色的view尺寸完全等于label的尺寸,但是,实际的结果是view的高度只覆盖了label的第一行。

    let view = UIView()
    rootLayout.addSubview(view)
    
    let label = UILabel()
    rootLayout.addSubview(label)
    
    label.tg_left.equal(10)
    label.tg_width.equal(.wrap).max(100)
    label.tg_height.equal(.wrap)
    
    view.tg_top.equal(label.tg_top)
    view.tg_bottom.equal(label.tg_bottom)
    view.tg_left.equal(label.tg_left)
    view.tg_right.equal(label.tg_right)
    
    label.text = "测试12345660392034323"
    view.backgroundColor = UIColor.red
@youngsoft
Copy link
Owner

您好,您所提的问题已经修复完成,请将版本升级到1.2.0,同时1.2.0还新增加了布局变换以及流式布局的浮动间距的功能。

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