Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When should I tick "Also create XIB file" checkbox in Xcode?

Tags:

xcode

ios

I am new to iOS development, and nearly all tutorials I've read said DON'T tick the "Also create XIB file" checkbox.

I've read Apple's documentation about XIB file and understood what XIB file does, but I still don't know when should I tick the checkbox and when shouldn't.

like image 745
hklel Avatar asked Jul 30 '15 16:07

hklel


1 Answers

It's all about preference. Older tutorials (before storyboards were introduced) will tell you to use XIB files, however, storyboard can be used as a complete replacement for XIBs.

If you prefer using XIBs, you can choose to stick with them. A storyboard is simply like a bunch of XIBs on the same page, which eliminates the number of files you will have in your project.

Using a storyboard will change some of the methods that you need to use in a View Controller class -- such as

-(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
like image 199
ecatalano Avatar answered Nov 17 '22 20:11

ecatalano