The story board is a technology launched by Apple after ios5. It is designed to integrate multiple nib files into one story board file for easy management. The story board can also reflect the navigation relationship between controllers, A lot of navigation services can be connected without writing.Code. However, I warn readers that the story board is not a good technique from the perspective of memory usage.
In order to compare the data we created using the master-Detail template in xcode, The storyboarddemo and NIB-based nibdemo applications are based on the story board. Then, use the allocations template of the instruments tool to analyze the differences in memory usage when the viewcontroller View Controller is loaded. The allocations template tracking of the nibdemo project and the allocations template tracking of the storyboarddemo project.
The screen starts at. 776.562 milliseconds, and the memory usage is 1.10 MB. The screen starts at. 911.718 milliseconds, and the memory usage is 1.11 MB. Nibdemo has a shorter start time than storyboarddemo. The memory usage is 0.01 MB, that is, approximately 10 KB.
By default, there is a storyboard file in the project, which integrates almost all controllers in the application. As the business complexity increases, the IB design screen on the storyboard will become messy, the storyboard file will become very huge. ApplicationProgramWhen loading the storyboard, the memory usage increases.
In fact, NiB is still a good technique, but it cannot express the navigation Relationship Between pictures. You need to write code manually for screen navigation.