ios - Open link starting with http but not www -



ios - Open link starting with http but not www -

i want open link starting www not open. code working http. please help > newer in ios.i shall highly obliged.

- (bool)webview:(uiwebview *)webview shouldstartloadwithrequest:(nsurlrequest *)request navigationtype:(uiwebviewnavigationtype)navigationtype { if (navigationtype == uiwebviewnavigationtypelinkclicked) { nslog("user tapped link."); } if ([request.url.absolutestring rangeofstring:@"iosscrollposition:"].location != nsnotfound) { nsstring *positionstring=[[[request url]absolutestring] stringbyreplacingoccurrencesofstring:@"iosscrollposition:" withstring:@""]; nsarray *positionarray=[nsarray arraywitharray:[positionstring componentsseparatedbystring:@","]]; nsinteger x=[[positionarray objectatindex:0] integervalue]; nsinteger y=[[positionarray objectatindex:1] integervalue]; if (initialyposition != y || y==0) { if (initialyposition!=0 ||x==0) { [myscrollview setcontentoffset:cgpointmake(myscrollview.contentoffset.x,myscrollview.contentoffset.y+20) animated:no]; } initialyposition=y; } if (x>320) { [webviewscrollview setcontentoffset:cgpointmake(x-300,webviewscrollview.contentoffset.y) animated:no]; } else if(x<320) { [webviewscrollview setcontentoffset:cgpointmake(0,webviewscrollview.contentoffset.y) animated:no]; } homecoming no; } else if([request.url.absolutestring rangeofstring:@"http://"].location == nsnotfound) { homecoming yes; } else { homecoming no; } }

nsurl *url=[nsurl urlwithstring:@"http://"]; [self.mywebview loadhtmlstring:tempstring baseurl:url];

ios uiwebview

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -