Quote:
Originally Posted by sukumar_77
If you are adding a pdf file as a resource file, then following code can be used.
Code:
NSString *pdfPath = [[NSBundle mainBundle] pathForResource:@"pdfFileName" ofType:@".pdf"];
NSURL *pdfURL = [NSURL URLWithString:pdfPath];
|
This works well but you have to remove the dot (".") from the file type or it doesn't work. so the "ofType" parameter should be as follows:
ofType:@"pdf"
Notice the dot is missing.