Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 10-07-2008, 11:17 AM   #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
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,181
Threads: 38,954
Posts: 170,899
Top Poster: smasher (2,565)
Welcome to our newest member, Zephyros
Powered by vBadvanced CMPS v3.1.0

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