lazy var

What? The vars that are marked lazy won’t be initialized until it’s used the first time.
When to use, if the var is a view? 

  • When the view has a good chance of never needed based on the condition. e.g., views in a collapsible panel. 
  • When the view isn’t needed before user interaction starts. Such as off-screen views, or views can be shown with delay.