Custom modifiers encapsulate multiple modifiers in a single structure, and we can apply them later to the views. struct ImageModifier: ViewModifier {
func body(content: Content) -> some View {
content
.scaledToFill()
.shadow(color: .black, radius: 5, x: 5, y: 5)
.cornerRadius(10)
}
} The struct must conform to the ViewModifier protocol…