Contents

Image.Scale

A scale to apply to vector images relative to text.

Declaration

enum Scale

Overview

Use this type with the imageScale(_:) modifier, or the imageScale environment key, to set the image scale.

The following example shows the three Scale values as applied to a system symbol image, each set against a text view:

HStack { Image(systemName: "swift").imageScale(.small); Text("Small") }
HStack { Image(systemName: "swift").imageScale(.medium); Text("Medium") }
HStack { Image(systemName: "swift").imageScale(.large); Text("Large") }

[Image]

Topics

Getting image scales

See Also

Configuring an image