SOFTWARE DEVELOPMENT

SwiftUI Tips & Tricks — Personal Cookbook

A personal list of favorite tips & tricks for SwiftUI

  1. name- a property that returns the name of our View, how it will be displayed in the list; given that all Previews have automatically generated names ViewName_Previews, you can _Previewscut it off.
  2. I added a property starredbecause the number of Views will continue to increase, and starting to work with a new piece of code, I would like to see it at the top of the list. This can be done by overriding this property in the preview for the new View, returning true.
SwiftUI Tips & Tricks — Personal Cookbook
SwiftUI Tips & Tricks — Personal Cookbook
  • add support PreviewHolder.

Read More

If you found this article helpful, click the💚 or 👏 button below or share the article on Facebook so your friends can benefit from it too.

Written by

Bioinformatician at Oncobox Inc. (@oncobox). Research Associate at Moscow Institute of Physics and Technology (@mipt_eng).

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store