I've a stackview with an image and another stackview. This sub stackview contains two labels, the username and the tweet text. The tweet text may contain multiple lines.
I'd like the image to be centered vertically within the stackview. If I add a vertically align constraint to the UIImage the stackview takes the height of the image and truncates the twitter text.
Is it possible to vertically align the fixed size image vertically in the stackview without the tweet body being truncated with auto-layout? Or has this be done programmatically?
Cell
Constraints
尝试设置stack.alignment = .center
,如果视图在堆栈中,则应修改堆栈属性,而不是UIView
的属性。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.