Framework of the production of the project see: http://www.cocoachina.com/ios/20141126/10322.html;
Problems encountered:
Two solutions were found because of the use of picture resources in their own framework.
1. Use the new bundle;
Use the first method:
Create a new bundle type of project, get bundles, or if it's just a picture, you can rename the picture folder directly, Xxx.bundle line. You need to drag the. Framework and. bundle files into your project when you use them.
How to use the framework:
[UIImage imagenamed:@ "mybundlename.bundle/myimagename"];
2. Package directly as a resource file into the framework,
How to use: Drag the. Framework into the project and add the framework to the copy bundle resources.
[UIImage imagenamed:@ "mybundlename.framework/myimagename"];
Advantages and Disadvantages
1. The first requires two resource files to be put into the project, but the bundled bundles will be small because there is no redundant binary (after the code in the framework is compiled) packaged into bundles.
2. The second type has only one resource file, but the bundle will be larger than the first, since a portion of the redundant binary (the code in the framework is compiled) is packaged into the bundle.
iOS Framework uses picture resources