Skip to content

Instantly share code, notes, and snippets.

@jk
Last active December 15, 2015 02:19
Show Gist options
  • Save jk/5186668 to your computer and use it in GitHub Desktop.
Save jk/5186668 to your computer and use it in GitHub Desktop.
// are there any benefits in using the new UINib
NSArray *topLevelObjects1 = [[UINib nibWithNibName:@"myCell" bundle:nil] instantiateWithOwner:nil options:nil];
// instead of the old approach?
NSArray *topLevelObjects2 = [[NSBundle mainBundle] loadNibNamed:@"myCell" owner:nil options:nil];
@jk
Copy link
Author

jk commented Mar 18, 2013

So the conclusion is: UINib caches and NSBundle doesn't. You should use UINib in every case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment