0

I am implementing on wikipedia iphone application.In which I have implemented below features.

  • User can search the wikipedia using keyword.
  • User can view wikipedia in webview.

Query. Now I want to store this wikipedia in application or sqlitedabas.

So when net is not available at that time user can view wikipedia from the application or local database.

PLease help me for this query..

Thanks in advance

ManthanDalal
  • 1,063
  • 2
  • 20
  • 45

2 Answers2

0

Well you need to use Core Data to store and manage your info inside a SQLite DB.

Then you need to build a system that lets you store those info inside your DB.

Start here for a Core Data http://developer.apple.com/library/ios/#documentation/Cocoa/Reference/CoreData_ObjC/_index.html

Oscar Peli
  • 1,108
  • 2
  • 11
  • 18
0

convert webview into image and then save it in database

i think this will help you

CGSize sixzevid=CGSizeMake(1024,1100);
UIGraphicsBeginImageContext(sixzevid);
[webview.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();

NSData *imageData = UIImagePNGRepresentation(viewImage);

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES);
NSString *documentsDirectory = [paths objectAtIndex:0]; 
NSString *pathFloder = [[NSString alloc] initWithString:[NSString stringWithFormat:@"%@",@"new.png"]];
NSString *defaultDBPath = [documentsDirectory stringByAppendingPathComponent:pathFloder];


[imageData writeToFile:defaultDBPath atomically:YES];

for more details check the below link http://www.iphonedevsdk.com/forum/iphone-sdk-development/21451-save-contents-uiwebview-pdf-file.html

Deepak
  • 439
  • 1
  • 5
  • 13
  • @JohnWhite if i helped you click my answer as correct thank you – Deepak Nov 08 '11 at 10:35
  • Yes its little bit help full...but it converts in to image only for visible area of webview – ManthanDalal Nov 08 '11 at 11:05
  • we can reduce the size of the text in webview but i dont know how to reduce the wiki..... the below link will help you reduce the size of the text in web try this link http://stackoverflow.com/questions/589177/how-to-increase-font-size-in-uiwebview – Deepak Nov 08 '11 at 12:07