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)
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">800</int>
<string key="IBDocument.SystemVersion">10D573</string>
<string key="IBDocument.InterfaceBuilderVersion">762</string>
<string key="IBDocument.AppKitVersion">1038.29</string>
<string key="IBDocument.HIToolboxVersion">460.00</string>
ET CETERA...
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:"
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.
I'm just not exactly sure how I should use "loadNibFile:externalNameTable:withZone:" Can anyone give me some advice or an example?
Thanks in advance!