title: What is better way to code a custom pop-view use xib
body: <p>What i have done in StePopView.m file so far is that :</p>
  
  <pre><code>+(instancetype)loadFromXib{
      return [[NSBundle mainBundle]loadNibNamed:NSStringFromClass(self) owner:nil options:nil][0];
  }
  -(void)awakeFromNib{
      [super awakeFromNib];
      //configure my view
      self.backgroundColor = [[UIColor colorWithWebStr:@"050205"] colorWithAlphaComponent:0.33];
  
  }
  //when move to superView, call show method to show a pop view with animation 
  -(void)didMoveToSuperview{
      [self show];
  }
  -(void)show{
      //show a pop view with animation
  }
  </code></pre>
  
  <p>When i use this pop-view  in superView:</p>
  
  <pre><code>StePopView* popView = [StePopView loadFromXib]; 
  popView.frame.bounds = self.bouds;
  [self addSubView:popView]
  </code></pre>
  
  <p>Is this a better coding ? And what`s the better code and why? Thanks in advance! </p>