RootViewController *rvController = [[RootViewController alloc] initWithNibName:@"RootViewController" bundle:[NSBundle mainBundle]];
sometimes i see it use nil ,i dont know what exactly it use for?
Here is the exact explanation for that:
The bundle in which to search for the nib file. This method looks for the nib file in the bundle's language-specific project directories first, followed by the Resources directory. If nil, this method looks for the nib file in the main bundle.
I think [NSBundle mainBundle] doesn't do anything different than you put nil. However, if you want to do internationalization and localization, you can use them
More details here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With