minSize(width:height:)
Sets the minimum size for the configuration.
Declaration
func minSize(width: CGFloat? = nil, height: CGFloat? = nil) -> UIHostingConfiguration<Content, Background>Parameters
- width:
The value to use for the width dimension. A value of
nilindicates that the system default should be used. - height:
The value to use for the height dimension. A value of
nilindicates that the system default should be used.
Discussion
Use this modifier to indicate that a configuration’s associated cell can be resized to a specific minimum. The following example allows the cell to be compressed to zero size:
UIHostingConfiguration {
Text("My Contents")
}
.minSize(width: 0, height: 0)