Note that there are some explanatory texts on larger screens.

plurals
  1. POXCode - (iOS) Calling a local HTML file in to a SplitView via .plist reference?
    primarykey
    data
    text
    <p>Newbie here (as may be evident by the question) but after many many hours of trying to figure this one out I have hit a point I need to ask for help...</p> <p>Basically, all I want to do is parse a string from an array populated within a .plist. This string being a local URL. It works perfectly for external URL's, but no matter what I have tried for a local URL, all I get is nothing - Not even a URL not found (I lie - that did happen once but to never again be replicated).</p> <p>Any and all help will be greatly appreciated!</p> <p>I have this code in DetailViewController:</p> <pre><code> NSString *attractionURL = [detailItem description]; NSURL *url = [NSURL URLWithString:attractionURL]; [wikiView loadRequest:[NSURLRequest requestWithURL:url]]; </code></pre> <p>And this code in a popOver (RootViewController):</p> <pre><code>- (void)viewDidLoad { [super viewDidLoad]; self.clearsSelectionOnViewWillAppear = NO; self.contentSizeForViewInPopover = CGSizeMake(320.0, 600.0); NSBundle *bundle = [NSBundle mainBundle]; NSString *path = [bundle pathForResource:@"recipes" ofType:@"plist"]; attractions = [[NSArray alloc] initWithContentsOfFile:path]; self.title = @"Recipes"; </code></pre> <p>With the URL's in a .plist file:</p> <pre><code>&lt;array&gt; &lt;array&gt; &lt;string&gt;Sirloin&lt;/string&gt; &lt;string&gt;http://Resources/iPad/index.html&lt;/string&gt; &lt;/array&gt; &lt;array&gt; &lt;string&gt;Chasseur&lt;/string&gt; &lt;string&gt;http://www.jamesmartinsfood.com&lt;/string&gt; &lt;/array&gt; &lt;/array&gt; &lt;/plist&gt; </code></pre> <p>Like I say, external URL works fine, local just doesn't do squat...</p> <p>Cheers!</p>
    singulars
    1. This table or related slice is empty.
    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.
    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