Note that there are some explanatory texts on larger screens.

plurals
  1. POLoad (and display) a .XIB from the web
    text
    copied!<p>I want to be able to download (via a NSURLConnection request) a .XIB file, and have it presented in a view. I have implemented the NSURLConnection, and surely enough, when the connection completes, I am left with a NSString of XML data representing the XIB file. Example: (just the first few lines of many)</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10"&gt; &lt;data&gt; &lt;int key="IBDocument.SystemTarget"&gt;800&lt;/int&gt; &lt;string key="IBDocument.SystemVersion"&gt;10D573&lt;/string&gt; &lt;string key="IBDocument.InterfaceBuilderVersion"&gt;762&lt;/string&gt; &lt;string key="IBDocument.AppKitVersion"&gt;1038.29&lt;/string&gt; &lt;string key="IBDocument.HIToolboxVersion"&gt;460.00&lt;/string&gt; ET CETERA... </code></pre> <p>I looked through the documentation, and I believe that I cannot use "initWithNibName:" because it is being retrieved from the web. What I believe I need to do is save the .XIB to the app's document directory, and then use "loadNibFile:externalNameTable:withZone:"</p> <p>Essentially what I want to do is have an iPad application, and there is a small 320x480 window, where a .XIB loaded from the web can be displayed. If I can attach it locally to a ViewController all the better, but not completely necessary.</p> <p>I'm just not exactly sure how I should use "loadNibFile:externalNameTable:withZone:" Can anyone give me some advice or an example?</p> <p>Thanks in advance!</p>
 

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