Note that there are some explanatory texts on larger screens.

plurals
  1. POCreating a static framework that uses Xibs...how to?
    primarykey
    data
    text
    <p>I have a need to create a packaging of UI classes that can be included in an XCode4 <strong><em>integration project</em></strong> by a developer and then get instantiated through the use of a config file in conjunction with NSClassFromString - a <strong><em>static plugin</em></strong>.  I have had success with creating libraries that contain UIViews that layout based on code.  Now I am trying to allow the developer to create UIs based on xib files and other resources.  I am implementing the most basic version of this...a UIViewController loading a xib file created directly through the "new file" wizard in XCode4.  The only modification I am making is adding a label to the UI in the xib.  </p> <p>I am having problems getting the xib loaded.  If I include the xib in the <strong><em>integration project</em></strong> all is well. When I create the UIViewController from the library it finds the xib in the root of the app bundle and loads it.  However, this is very cumbersome during the build of the <strong><em>integration project</em></strong>, I would like to be able to just link to the library and not have to add each xib to the <strong><em>integration project</em></strong> individually.  Additionally the use of the root of the application bundle is bad because there is no directory structure that could facilitate multiple <strong><em>static plugins</em></strong>.  I have tried creating a folder that the <strong><em>integration project</em></strong> can include during its build and the xibs for the static plugin can just be dumped into folder prior to build.  If I do this the xib gets into the app bundle but when the UIViewController class loads up it cannot find the xibs.  I have been unable to code a solution to get the UIViewController to initWithNibName:bundle: properly when the xibs are in the sub-folder.  </p> <p>My last attempt has been to create a static framework using this article: <a href="http://simplyitinc.blogspot.com/2011/04/creating-static-framework-in-xcode-4.html">http://simplyitinc.blogspot.com/2011/04/creating-static-framework-in-xcode-4.html</a> . That seems to get me a framework I can link against and the xib is in that framework directory but ... the xib does not get placed into the app bundle when I link against the framework.  My classes are available but fail to load the xib, obviously because it is not in the app bundle.  </p> <p>Any suggestion on how this requirement might be accomplished?  </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload