First, the new bundle
The first 2 articles describe the latest iOS framework and. A static library production and use of full-solution iOS engineering covers, Master Engineering and framework Engineering or. A library static library project linking
I am now in the main project of the sub-project, of course, you create a static library project (sub-project) is also possible. Before I was too lazy to build the project, and then ready-made main project project.
1. Follow the steps
2. Because there is no bundle in the iOS framework, select the OS X framework to find the bundle, as
Second, the bundle plus resource files
Add the project's resource files to the bundle you just built, such as xib, pictures. Click the + sign or drag all the lines directly. Steps such as.
Third, set bundle
1.iOS Deployment Target change to the minimum version you support
2. Set the base SDK to latest IOS
Iv. Compiling bundles
If you choose your bundle as target to compile
V. Using the resource files in the bundle
1. If you drag your bundle to the master project's copy bundle resources
2. Use the Xib code as follows
NSBundle *bundle = [NSBundle bundlewithurl:[[nsbundle mainbundle] Urlforresource:@ "appbasesdkbundle" Withextension:@ "bundle"]; Nsarray *nibs = [Bundle loadnibnamed:@ "zlftabbar" Owner:nil Options:nil];
3. Use the image code as follows
NSBundle *bundle = [NSBundle bundlewithurl:[[nsbundle mainbundle] Urlforresource:@"Appbasesdkbundle "Withextension:@" Bundle "@ "zhuanqian " Inbundle:bundle Compatiblewithtraitcollection:nil]; // or Uiimageview *v2 = [[Uiimageview alloc] initWithFrame : CGRectMake (0,100, 50 , 50@ " Appbasesdkbundle.bundle/zhuanqian
Vi. processing after modifying a resource file
1. For a static library has been made, each time the resource file has been modified to recompile the bundle.
2. There is another way to do the case of the main engineering project without recompiling the bundle. If you add a dependency on the project to the main project, you will compile the sub-project each time you compile the main project.
Add a dependency on the bundle to the sub-project so that the bundle is compiled each time the child project is compiled.
After a 2-tier dependency, the resource file is compiled when the main project is compiled.
Use xib and picture resources in the IOS framework static Library