Classes need you to write an initializer. You must tell classes, "When you create yourself, here are your initial values. But you must use this initializer to set everything up." (Unless you initialize all your vars with default values.)
With Structs, you can just say "Create yourself, and here are your starting values." The struct will know how to assign values to its vars and lets without having a specific initializer. Not sure what lessons you are watching at the moment, but @twostraws gradually introduces more complex topics after you've been comfortable with the basics.
So when you watch a video where he's creating an initializer for a Struct, ask yourself "WHY? Why is he creating an initializer??" Most likely you should be learning a new technique. Discover the reason behind the Struct's initializer, and take notes.
In future, when designing your own Structs, you'll have several techniques to consider.
- Use the (free) memberwise initializer.
- Write a custom initializer.
- Write several initializers with customized parameters.
There is no ONE way to do this. You have to consider your struct's requirements, and select the correct technique.
So if you examine the CapsuleText() struct, you'll see it requires just one parameter, a String.
Do you need to write an initializer for this? Probably not. Use Technique #1, the free initializer.
But when you get to Views that are customized components, perhaps containing a Slider, or some other control, you'll have to have bindings. These may require you to think about the struct's requirements. And no, the free initializer may not work for those views.
This is when you'll want to refer to your excellent notes!