When I was beginning to learn iOS programming, I was building UI in xib file. But when I had developed some projects, I began to just write code to implement my UI.
There are some benefit through building UI programmatically:
First, by writing code, you have the view hierarchy clearly in you mind, and the view hierarchy can be important to efficiently implement your UI.
Second, if your UI is complicated, for example, with some animation or transform, you will benefit quite a lot from coding UI. Even sometimes you may not use UIView to build UI, you may use CALayer to accomplish some effect, which can not built by xib file.
Furthermore, when you get used to building UI programmatically, you will love it, because you can just code in the .m file and has no need to worry about the xib file.
However, if you are just a beginner in iOS programming, just fine to get start with xib file.
(Apple now provide StoryBoard, I have not learned about it, you may learn it to find if there is anything new.)