objective c - UIWebView isn't displayed until moved by touches -
i have 3 webviews in uiview , 1 showed. when loading urls not-displayed webviews, , move them frame center show white box - white screen, if keep saying finished loading. so... there possibiliy force them redraw after loading? when scroll them in random direction webviews encouraged show content... other ideas fix bug?
code:
- (bool)webview:(uiwebview *)webview shouldstartloadwithrequest:(nsurlrequest *)request navigationtype:(uiwebviewnavigationtype)navigationtype { return yes; } - (void)webviewdidfinishload:(uiwebview *)webview { boolean end = true; (int = 0 ; < 3 ; ++) { if ( mainwebviews[i].isloading ) { end = false; } } if (end) { //nslog(@"nothing loading?"); [loader stopanimating]; loader.hidden = yes; } webview.hidden = no; // how redraw here? } - (void)webviewdidstartload:(uiwebview *)webview { //nslog(@"start loading"); webview.hidden = yes; loader.hidden = no; [loader startanimating]; } -(void)webview:(uiwebview*) wv didfailloadwitherror: (nserror*) error { // stupid -999 error if ( [error code] != nsurlerrorcancelled ) { nslog(@"error"); nslog( [error localizeddescription ]); } } -(void)loadtowebview:(uiwebview*)wv string:(nsstring*)url { if (wv == nil) return; [wv loadrequest:[nsurlrequest requestwithurl:[nsurl urlwithstring:url]]]; }
Comments
Post a Comment