title: add subview to subclassed UITextField not showing
body: <p>I have subclassed a <code>UITextField</code> and trying to add a subview by calling <code>[self.superView addSubview:newView]</code> but this is not working and <code>self.superview.class</code> returns <code>null</code>. </p>
  
  <p>How can one add a subview to the <code>superView</code></p>
  
  <p>The view is showing on the screen and done using Storyboard</p>
  
  <pre><code>@interface NewTextField : UITextField &lt;UITextFieldDelegate&gt;
  
  
  @end
  </code></pre>
  
  <p>and then</p>
  
  <pre><code>@implementation MBTextField
  
  
  - (id)initWithCoder:(NSCoder *)coder
  {
      self = [super initWithCoder:coder];
      if (self) {
          [self addWhiteLine]; // here im adding a view 
      }
      return self;
  }
  
  
  - (void)addWhiteLine{
  
      UIView *div = [UIView new];
      div.frame = CGRectMake(self.frame.origin.x,
                             self.frame.origin.y + self.frame.size.height+borderWidth,
                             self.frame.size.width,
                             borderWidth);
  
      div.backgroundColor = [borderColor colorWithAlphaComponent:0.3f];
      [self.superview addSubview:div];
  
  }
  </code></pre>
  
  <hr>
  
  <p><strong>Solution</strong>: accepted answer and comments by @mackworth. Frame of the view had to be changed to following.</p>
  
  <pre><code>    div.frame = CGRectMake(0,
                             self.frame.size.height - borderWidth,
                             self.frame.size.width,
                             borderWidth);
  </code></pre>