title: programmatically add a bunch of custom view from XIB to UIStackView
body: <p>I have a TagDisplayCell.xib with the associate TagDisplayCell.m. In the <code>.m</code> file i load the view like so.</p>
  
  <pre><code>- (id)initWithCoder:(NSCoder *)aDecoder{
      self = [super initWithCoder: aDecoder];
      if(self){
          //load the interface file from .xib
          [[NSBundle mainBundle] loadNibNamed:@"TagDisplayCell" owner:self options:nil];
  
          //add as subview
          [self addSubview:self.view];
  
          self.view.translatesAutoresizingMaskIntoConstraints = NO;
  
          [self addConstraint:[self pin:self.view attribute:NSLayoutAttributeTop]];
          [self addConstraint:[self pin:self.view attribute:NSLayoutAttributeLeft]];
          [self addConstraint:[self pin:self.view attribute:NSLayoutAttributeBottom]];
          [self addConstraint:[self pin:self.view attribute:NSLayoutAttributeRight]];
      }
  
      return self;
  }
  </code></pre>
  
  <p>In my view controller there is a vertical <code>UiStackView</code> (so that the contents are stacked in rows). I want to add several instances of the <code>TagDisplayCell</code> to this UiStackView. Here is what i am doing.</p>
  
  <pre><code>//create all the views 
  for(int i=0; i&lt;[commentsAndTagsArray count]; i++)
  {
      NSObject *obj =commentsAndTagsArray[i];
      if ([obj isKindOfClass:[Tag class]])
      {
          Tag *tempTag = ((Tag*) obj);
          TagDisplayCell *tempTagCell = [[TagDisplayCell alloc] initWithFrame:frame];
          [uiStackView addSubview:tempTagCell];
      }
  }
  </code></pre>
  
  <p>When i run this nothing displays on the screen. What am i missing here?</p>
  
  <p><strong>Update: Here is my TagDisplayCell.xib"</strong>
  <a href="https://i.stack.imgur.com/5dYK3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5dYK3.png" alt="enter image description here"></a></p>