如何将UILabel的基线与UIImageView的底部对齐? [英] How to align UILabel's baseline to the bottom of a UIImageView?

查看:123
本文介绍了如何将UILabel的基线与UIImageView的底部对齐?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将UILabel的基线与UIImageView的底部对齐.我发现我无法选择标签的基线作为标签的属性.但是,我还发现,如果将图像视图替换为另一个标签,则可以使用基线.

I am trying to align a UILabel's baseline to the a UIImageView's bottom. I found I couldn't choose the baseline of the label as the attribute of the label. However, I also found I could use baseline if a replace the image view with another label.

是否可以将标签的基线与图像的底部对齐?

Is there a way to align a label's baseline to an image's bottom?

推荐答案

nib编辑器不允许您执行某些操作.您将需要在代码中配置该约束.

There are some things the nib editor just won't let you do. You will need to configure that constraint in code.

这篇关于如何将UILabel的基线与UIImageView的底部对齐?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆