Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

troop231

macrumors 603
Original poster
Jan 20, 2010
5,826
561
Trying to work on my app and I'm really stumped on how to accomplish loading a pdf view in the next drill down when I click on a state. For now, I have the detailView set to display a message saying: You have clicked on (x)state, but I want to use a UIWebView to load a local resource pdf file for the selected state.

So basically so far I have: A first level view controller, a second level view controller, and a detail controller. I have an array of states init'ed in the void viewDidLoad but not really sure how to point each row in the list to the associated pdf file for that state, here's some pics: THANKS! :D

screenshot20110214at114.png
screenshot20110214at114.png
 
Last edited:
but not really sure how to point each row in the list to the associated pdf file for that state...

So you have a UITableView? This method is called when a row is selected, and you will need to instantiate a UIViewController sub-class (that has a UIWebView) in order to present the PDF.

Code:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
 
So you have a UITableView? This method is called when a row is selected, and you will need to instantiate a UIViewController sub-class (that has a UIWebView) in order to present the PDF.

Code:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

Huh? I'm pretty sure I already have that, but I'm wondering if I should make an array in a plist with all the states and the values of the pdfs but I'm not sure how to do that.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.