We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
正常来说,只需要上边和左边就能确定 UILabel 的位置,但右边的约束的作用实际是“撑宽”UIScrollView,这时错误就只有一个了: 很明显,UIScrollView 可以确定其 contentView 的宽度了,因为 UILabel 的宽度固定,它的左边到 UIScrollView 的左边固定,它的右边到 UIScrollView 的右边固定,于是 AutoLayout 系统可以通过这些约束“猜出” UIScrollView 的 contentView 的宽度。
引用了文章中的一段话。看到这里我有个疑问,有什么好的办法能使UIScrollView子视图的label宽度左右两边保持和屏幕等距呢(比如说左右各8)。我能想到的是代码加上layoutConstraint。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
引用了文章中的一段话。看到这里我有个疑问,有什么好的办法能使UIScrollView子视图的label宽度左右两边保持和屏幕等距呢(比如说左右各8)。我能想到的是代码加上layoutConstraint。
The text was updated successfully, but these errors were encountered: