title: Lazy loading Properties in swift
body: <p>I'm attempting to wrap my head around the Swift language.  A common pattern when building views in code with Objective-C is to override UI properties and lazy load them like so:</p>
  
  <pre><code>@property(nonatomic, strong) UILabel *myLabel;
  
  - (UILabel *)myLabel
  {
       if (!_myLabel) {
           _myLabel = [[UILabel alloc] initWithFrame:CGRectMake(20.0f, 75.0f, 320.0f, 20.0f)];
          [_myLabel setFont:[UIFont subHeadlineFont]];
          [_myLabel setTextColor:[UIColor subHeadlineColor]];
          [_myLabel setText:@"Hello World"];
       }
       return _myLabel;
  }
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
      [self.view addSubview:self.myLabel];
  }
  </code></pre>
  
  <p>This allows for the configuration  of UIElements to be self contained within their setup but doesn't result in reconfiguring them every time.</p>
  
  <p>It seems we don't have access to the backing store in Swift and the <code>@lazy</code> keyword doesn't really have the same semantics.</p>
  
  <p>I'm curious if anyone has identified a similar pattern in Swift that allows one to keep the configuration of variables and constants together with their declaration in a neat syntactic way that doesn't result in reconfiguration every time?</p>