'How does a XIB file in a ViewController is called

I know how to create a XIB for UIView or UIViewController classes. What I want to know is the lifecycle of XIB?

How it is constructed. I think it comes before ViewDidLoad but I don't have any constructed call for me to know how the ViewController is connected to XIB.

Can you guys give me a simple answer on how it works? Thanks in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source