SwiftUI — Using Frames To Align

Learn to use the Frame Modifier to align you views

Alessandro Manilii
3 min readJan 27

--

Photo by Emma Pollard: https://www.pexels.com/it-it/foto/foto-di-pianta-a-foglia-di-formaggio-svizzero-verde-rettangolare-montata-sul-muro-1534924/

Frame is one of the most widely used modifier in SwiftUI. Almost every time that I’ve seen it in code is used to give a view a specific size. Anyway .frame can be used in a very clever way to align out content.

The Basic

--

--

Alessandro Manilii

I’m an Italian professional iOS Developer, iOS Tech Lead at Wakala — Join Medium from the following link: https://medium.com/@alessandromanilii/membership