title: Set Constraints Programatically Of An XIB File in Swift
body: <p>How to Attach XIB File at the buttom of Super view</p>
  
  <p>I Have an XIB File Named "xibFIleView"</p>
  
  <p><a href="https://i.stack.imgur.com/ggYON.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ggYON.png" alt="enter image description here"></a></p>
  
  <p>My code for calling XIB View is:-</p>
  
  <pre><code> override func viewDidLoad() {
          super.viewDidLoad()
  
         self.view.addSubview(instanceFromNib())
      }
  
      func instanceFromNib() -&gt; xibFIleView {
  
          return UINib(nibName: "xibFileView", bundle: nil).instantiate(withOwner: nil, options: nil)[0] as! xibFIleView
      }
  }
  </code></pre>
  
  <p>When I run My project my Simulator shows:-
  <a href="https://i.stack.imgur.com/LfpIP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LfpIP.png" alt="enter image description here"></a></p>
  
  <p>How Can We Attach XIB view at the Bottom of the super view.</p>