title: How to add subview inside main view in Swift
body: <p>I need advice how to proceed.</p>
  
  <p>How to slightly dim the main view and display some busy indicator, for the duration of of some action, and then remove the dimming?</p>
  
  <p>In Swift language.</p>
  
  <p>Thanks!</p>
  
  <p>UPD: In Objective-C I use earlier something like this:</p>
  
  <pre><code>UIView *dimView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 460)];
  dimView.backgroundColor = [UIColor blackColor];
  dimView.alpha = 0.5f;
  dimView.tag = 1111;
  dimView.userInteractionEnabled = NO;
  [self.view addSubview:dimView];
  </code></pre>
  
  <p>How this code we can do it in Swift?</p>