Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
对于由一些相互堆叠的视图组成的布局,这是所有视图,我想知道如何自动调整主视图的大小,subviews这 可能是一旦应用程序上线并且更新进来。 宽度是固定的。 UIViewUIViewmultilineUIView
subviews
UIView
multiline
我相信视图(UIView)会自行调整大小,所以我认为您不会面临这个问题。尽量不要限制高度,并确保在执行此操作时选择适当的堆栈视图,因为您有多个。希望这会有所帮助,因为我假设您没有为此使用集合视图!