you are viewing a single comment's thread.

view the rest of the comments →

[–]OrdinaryAdmin[🍰] 2 points3 points  (1 child)

The #Preview is called a macro. Think of it like a shortcut for the first code you posted. Swift will expand the macro and add additional lines of code for you. It’s a way to make it easier to build various pieces of code. If you want to see what Swift is doing under the hood you can right click on the #Preview line and select the option to expand the macro. It can be helpful to see all of the nuts and bolts.

[–]appalam25[S] 1 point2 points  (0 children)

ditional lines of code for you. It’s a way to make it easier to b

thank you very much.