Project Add engineering dependent Xcode IOS

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.