title: Trying to instantiate a UIView through class method
body: <p>I'm experimenting with different ways of displaying a <code>UIView</code> on the screen... I currently have this code, and think it should work to add a green <code>UIView</code> to the app's window, however, it doesn't:</p>
  
  <pre><code>- (id)initWithFrame:(CGRect)frame
  {
      self = [super initWithFrame:frame];
      if (self) {
          NSLog(@"init");
          self.backgroundColor = [UIColor greenColor];
          self.alpha = 1;
      }
      return self;
  }
  
  + (SMLoginView *)sharedView{
      static dispatch_once_t onceToken;
      static SMLoginView *sharedView;
      dispatch_once(&amp;onceToken, ^{
          sharedView = [[self alloc]initWithFrame:[UIScreen mainScreen].bounds];
      });
  
      return sharedView;
  }
  
  + (void)showLoginView{
      [[self sharedView]show];
  }
  
  
  - (void)show{
      NSLog(@"Show");
      [[[[UIApplication sharedApplication] delegate] window] addSubview:self];
  }
  </code></pre>