Wednesday, October 28, 2026
HomeiOS Developmentios - Learn how to get default system dimension of image picture...

ios – Learn how to get default system dimension of image picture in UIListContentConfiguration?

[ad_1]

When utilizing UIListContentConfiguration, in case you present an SF Image picture, the system decides easy methods to dimension it primarily based in your dynamic kind textual content dimension. “Image photographs can be centered inside a predefined reservedLayoutSize that’s scaled with the content material dimension class.” (Documented in header feedback for reservedLayoutSize)

In my app I need to create a sidebar with cells just like the Photographs app – an album cell has a photograph for the picture moderately than an emblem. To do that, I must know what dimension to make the picture, for the reason that dimension of the cell’s picture view is decided by the scale of the picture you present. “Non-symbol photographs will use a reservedLayoutSize equal to the precise dimension of the displayed picture.” It must be in step with the scale of different cells which do show image photographs.

How do you get the predefined system reserved structure dimension?

UIListContentConfiguration.ImageProperties.standardDimension sounded promising however that is only a fixed that informs the system to make use of its default dimension, moderately than exposing that dimension – its worth is -1.7976931348623157e+308.

contentConfiguration.imageProperties.reservedLayoutSize is CGSize.zero by default which suggests the default dimension is used. So how will we get that dimension?

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments