简体   繁体   中英

I am not able to use static library

I just started learning iPhone development and i am stuck at this point. My problem is as follows:

I need a text box with autocomplete functionality several times in my project. So i created a static library which contains a viewController and in it a text box and a table(hidden, but shown when user types). I have added the text-box and table manually through coding. And just connect the view to Files Owner. The xib contains nothing else but view. Now i want to use it in my project at many places. So I created a simple view-based application project and included my static library in it. But i dont know how do i use the text box or view on my new project's view. Please help me out of this.

Here are simple steps:

  1. Drag drop the static lib to your project.
  2. Remember to check Relative to project while copying.
  3. Import classes in header files.
  4. Write name of your class in Target settings/Header Search Path.
  5. Add some flags like -ObjC and -all_Load if needed.
  6. Instantiate the necessary objects.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM