# Regarding view modifiers in chap 3.1

**URL:** <https://forums.kodeco.com/t/regarding-view-modifiers-in-chap-3-1/136137>\
**Category:** SwiftUI by Tutorials\
**Created:** [March 25, 2021, 8:00pm UTC](https://forums.kodeco.com/t/regarding-view-modifiers-in-chap-3-1/136137 "2021-03-25T20:00:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chinggis](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/chinggis/32/81494_2.png) [@chinggis](https://forums.kodeco.com/u/chinggis)\
**Post date:** [March 25, 2021, 8:00pm UTC](https://forums.kodeco.com/t/regarding-view-modifiers-in-chap-3-1/136137/1 "2021-03-25T20:00:06Z")

</div>

Perhaps I am misunderstanding something (quite possible). I know that one can define custom view modifiers, but was under the impression that one had to use the modifier keyword when defining one. In ViewExtension.swift, however, the northWestShadow and southEastShadow funcs make no use of the the modifier keyword and the book text doesn’t seem to make any reference to using that keyword when declaring a custom modifier.  
The only thing I can think of is that prefacing a view extension func name with a dot is shorthand for calling a func by that name that is defined by the View protocol.  
Am I correct in assuming that a modifier defined within a view protocol extension doesn’t require the use of the modifier keyword, while one that is defined in a struct does? If so, it would help to clarify this in section 3.1 of the book.  
Tom

---

<div class="post-metadata">

**Author:** ![audrey](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/audrey/32/111607_2.png) [@audrey](https://forums.kodeco.com/u/audrey)\
**Post date:** [March 26, 2021, 2:15am UTC](https://forums.kodeco.com/t/regarding-view-modifiers-in-chap-3-1/136137/2 "2021-03-26T02:15:14Z")

</div>

hi Tom! I didn’t know about `ViewModifier`. The resources I found for neumorphism just used `extension View`, so that’s how I did mine.

Chapter 6 covers `ViewModifier`. He creates a `ViewModifier` structure, then puts the `ModifiedContent` call in a view extension.

---

<div class="post-metadata">

**Author:** ![chinggis](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/chinggis/32/81494_2.png) [@chinggis](https://forums.kodeco.com/u/chinggis)\
**Post date:** [March 27, 2021, 4:27pm UTC](https://forums.kodeco.com/t/regarding-view-modifiers-in-chap-3-1/136137/3 "2021-03-27T16:27:50Z")

</div>

Ignore my question, Audrey. I realized later on that my speculation in the question was, in fact, correct (helps to go to bed and stare at the ceiling for a while). Regarding the ViewModifier protocol and defining custom modifiers, I’ll explore it more when I get to Chapter 6. I may be premature in saying this, but I think adding view modifiers in an extension is a more elegant approach.  
Tom
