Tuesday, 15 July 2014

ios - Using baseurl in UIWebView -



ios - Using baseurl in UIWebView -

i have issues loading site apparently has needing set baseurl. main site http://www.oklahomachristianacademy.org , site address need have open string returns

applewebdata://f6224b10-25ed...

so, in code thought work set baseurl , string attached above load app.

-(void)viewwillappear:(bool)animated { nsurl *theurl = [nsurl urlwithstring:@"http://www.oklahomachristianacademy.org/"]; [savedweb loadhtmlstring:(nsstring *)link baseurl:(nsurl *)theurl]; }

however, not work, , uiwebview displays applewebdata:// line again. missing?

use code

//nsstring *urladdress = @"http://www.google.com"; nsstring *urladdress = @"http://cagt.bu.edu/page/iphone-summer2010-wiki_problemsandsolutions"; //create url object. nsurl *url = [nsurl urlwithstring:urladdress]; //url requst object nsurlrequest *requestobj = [nsurlrequest requestwithurl:url]; //load request in uiwebview. [webview loadrequest:requestobj];

ios uiwebview base-url

No comments:

Post a Comment