Is it okay to still use XIB?

I seen a lot of tutorials using storyboards and was wondering if XIB is still a viable option? Seems like a lot of people are split online and I’ve seen some blogs where people prefer XIB. Is it just a matter of preference or situation?

I think it’s a bit of both.
I use storyboards to layout most of my view controllers, and the segues between them. But I sometimes also use .xib files if I want to make a custom UITableViewCell which will be reused in multiple table views (which I can’t do in a storyboard without duplicating a lot of effort), or to make a custom UITableViewHeaderFooterView (which I haven’t figured out how to do at all in a storyboard).
So, they have their uses.

1 Like


storyboard itself is collection of xibs. You can use both of them xib or storyboard according to your requirements. There is no any strict protocol that you can use xib is for some and storyboard is for other. It totally depends on your flexibility of your app development.