bundle
What is Bundle?
A bundle is a directory in file system that groups executable code and related resources such as executable code, images, sounds, nib files, private frameworks and libraries, plug-ins , loadable bundles.
event contain runtime-configuration file called the information property list(Info.plist)
feature
1.easy to install or relocate an application.
2. internationalization. you can setting English GUI and easy change to French GUI.
3.App can dynamically load code and resource from main bundle or subordinate bundles as require.
PS:
nib file
a special type of resource file use to store user interface of iOS and Mac Apps.
(like older storyboard)
Demo
use bundle switch storyboard in different Device
purpose:
iphone device use Main.storyboard automatically
ipad device use ipad.storyboard automatically
Detect method 1:
use userinterfaceIdiom to detect screen
Detect method 2 :
use [[UIScreen mainScreen] bounds].size.height to check device
Data From
https://developer.apple.com/library/content/documentation/General/Conceptual/DevPedia-CocoaCore/Bundle.htmlhttp://blog.csdn.net/startexcel/article/details/7099234
Edit:
20171121: add bundle example code