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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 08-03-2009, 04:46 PM   #6 (permalink)
shermankimb
Registered Member
 
Join Date: Jul 2009
Posts: 2
Default

Quote:
Originally Posted by sukumar_77 View Post
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];

I'm just getting started at this and what I'm trying to do is to make a simple app where I can click on the icon and a pdf comes up that can be expanded etc. I have created a simple app and then used this tutorial and it's not getting any errors but my pdf isn't showing up. My pdf is a resource file. I have put the code above in a view controller in the loadView section. I have no idea if this is correct - I've tried several other things as well. Can someone tell me where the code above is supposed to go.

Thanks!
shermankimb is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,866
Threads: 89,225
Posts: 380,691
Top Poster: BrianSlick (7,129)
Welcome to our newest member, sethaver
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:03 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.