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
请问这样的子视图怎么设置,或者父视图怎么设置? ps: 其实就是利用TGFlowLayout设计9宫格布局[但是不完全只有9个子视图,可能[0-n],是需要动态添加的]
Code
imageLayout = TGFlowLayout(.vert, arrangedCount: 3) imageLayout.tg_space = 5 imageLayout.tg_height.equal(.wrap) imageLayout.tg_gravity = TGGravity.horz.fill imageLayout.tg_width.equal(.fill)
当加入子视图时候.自动宽高相等
The text was updated successfully, but these errors were encountered:
您所谓的子视图添加时的自动宽高相等是什么意思?是让宽度均分?子视图的高度等于宽度吗? 如果是这样的需求的话,你只需要在你上面代码的基础上将你的子视图的高度设置为等于宽度,其他的什么也不需要写。
subview.tg_height.equal(subview.tg_width)
Sorry, something went wrong.
您所谓的子视图添加时的自动宽高相等是什么意思?是让宽度均分?子视图的高度等于宽度吗? 如果是这样的需求的话,你只需要在你上面代码的基础上将你的子视图的高度设置为等于宽度,其他的什么也不需要写。 subview.tg_height.equal(subview.tg_width)
好的.我试试.本以为只有相对布局能这样设置
No branches or pull requests
请问这样的子视图怎么设置,或者父视图怎么设置?
ps:
其实就是利用TGFlowLayout设计9宫格布局[但是不完全只有9个子视图,可能[0-n],是需要动态添加的]
当加入子视图时候.自动宽高相等
The text was updated successfully, but these errors were encountered: