Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-03-2011, 06:12 PM   #1 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 7
littletugboat is on a distinguished road
Question call html file from NSMutable string array issue

Hi Everyone.

I cannot display a local html file when called from the NSMutable array. (code below)
No problem displaying image or pdf.

I am using UIwebview. The name of the file is a string that should be read from the array like so:

[webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"%@" ofType:@"html"] isDirectory:NO]]];

pathForResource:@"%@" is the string to be read from the array eg January string, so I want January.html to open if selected in table, or February.html if selected (in iPad).

The array contains each string for the tables in splitView popover

I have been working at this for days and cannot solve it, but I know there is a simple solution somewhere. I have pasted the method as it is below.

Thank you anyone who can help

- (void)setDetailItemid)newDetailItem {
if (detailItem != newDetailItem) {
[detailItem release];
detailItem = [newDetailItem retain];

// Update the view.
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle
mainBundle] pathForResource:@"%@" ofType:@"html"] isDirectory:NO]]];

[self configureView];
}
if (self.popoverController != nil) {
[self.popoverController dismissPopoverAnimated:YES];
}
}
littletugboat is offline   Reply With Quote
Reply

Bookmarks

Tags
html page, nsmutablearray, uiwebview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 372
14 members and 358 guests
7twenty7, blasterbr, Clouds, dre, EvilElf, jeroenkeij, jimmyon122, Mah6447, Morrisone, n00b, pungs, Sami Gh, stanny, toon4413
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,667
Threads: 94,121
Posts: 402,900
Top Poster: BrianSlick (7,990)
Welcome to our newest member, host number one
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:47 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0