views:

27

answers:

0

Hi all, I'm trying to load a PDF in my App:

Using this works fine

        pdfURL=[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource: @"myFile" ofType:@"pdf"]];

            controller.pdfUrl = pdfURL;
            [self.navigationController pushViewController:controller animated:YES];
            [controller release];

However, i would like to be able to call the file from a NSString variable. i.e. Take out the @"myFile" and insert NSString fileName. Any idea what i'm doing wrong?

Thanks in advance!