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 10-07-2008, 12:17 PM   #3 (permalink)
Black Scyther
Registered Member
 
Join Date: Sep 2008
Posts: 36
Default

Here some code of my first try.

Code:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
	NSString *documentsDirectory = [paths objectAtIndex:0];
	NSString *path = [documentsDirectory stringByAppendingPathComponent:@"Einsatz_in_Unternehmen.pdf"];
	
	NSData *pdfData = [NSData dataWithContentsOfFile:path];
	
	NSURL *myUrl = [NSURL fileURLWithPath:path isDirectory:NO];
	
	fileView = [UIWebView alloc];
	[fileView loadData:pdfData MIMEType:@"application/pdf" textEncodingName:@"UTF-8" baseURL:myUrl];
I get a " *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFArray insertObject:atIndex:]: attempt to insert nil'" error.


Hope you can give me a hint.
Black Scyther is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,677
Threads: 89,156
Posts: 380,393
Top Poster: BrianSlick (7,110)
Welcome to our newest member, Buster2000
Powered by vBadvanced CMPS v3.1.0

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