In the previous examples, changes have been made to view alignments based on the standard alignment types. SwiftUI provides a way for the set of standard types to be extended by declaring custom alignment types. A custom alignment type named oneThird could, for example, be created which would make the point of alignment one third of the distance from a specified edge of a view.
Take, for example, the following HStack configuration consisting of four rectangles centered vertically:
Figure 27-11
The declaration to display the above layout reads as follows:
HStack(alignment: .center) {
Rectangle()
.foregroundColor(Color.green)
.frame(width: 50, height: 200)
Rectangle()
.foregroundColor...