Open felixkirathe opened 10 years ago
in the showInView function add below.
else if ([self.fileName hasPrefix:@"/"]) { //load a local file NSError* error = nil;
NSString* fileAtPath = self.fileName; NSString* fileContents = [NSString stringWithContentsOfFile:fileAtPath encoding:NSUTF8StringEncoding error: &error]; if (error!=NULL) { NSLog(@"error loading %@: %@", self.fileName, [error localizedDescription]); } else { [self.webView loadHTMLString: fileContents baseURL:[[NSBundle mainBundle] resourceURL]]; }
in the showInView function add below.
else if ([self.fileName hasPrefix:@"/"]) { //load a local file NSError* error = nil;