Sometimes we need to add other sub-projects in a main project, to write modifications to the sub-project, or to take advantage of the library files in the subproject, and so on, we need to use the project nesting. Step: (see picture to speak) 1. Create a new main project, called TESTTTTT, to create a new static framework project named MyLibrary. Put the two project files in a folder, such as:2. In Testtttt, do the following: The sub-project in the lower left corner "+" inside execute Add File to find MyLibrary in the project file added. 3. Add Dependencies:4. Add a path 5. You're done, now test to see if you can call a class in a sub-projectAdd header file: (as we add sub-works directly under AddFile)#import <MyLibrary/MyView.h>
Initializes an instance of://Add an external engineering test
MyView*view=[[MyViewAlloc]initwithframe:cgrectmake (100 , 100 100100 [selfview Addsubview:view];
Run the project, the view is displayed, no problem. callout: When using this method mylibrary can only be opened once, that is, in the case of TESTTTTT Open, mylibrary can no longer be opened, in order to avoid conflicts
Project Add engineering dependent Xcode IOS