ios - Why my UIWebview cannot 'full' screen? -
i have uiwebview
built on xib following settings:
[self.webview setscalespagetofit:yes]; self.webview.opaque = no;
however, there white spaces on bottom, while if try on mac's chrome , ios simulator's safari, doesn't have white space. setting lack in uiwebview
?
try code
- (void)initwebview { self.webview.scalespagetofit=no; [self.webview setopaque:no]; self.webview.autoresizingmask = uiviewautoresizingflexibleheight | uiviewautoresizingflexiblewidth | uiviewautoresizingflexibletopmargin | uiviewautoresizingflexiblebottommargin | uiviewautoresizingflexibleleftmargin | uiviewautoresizingflexiblerightmargin ; [(uiscrollview*)[self.webview.subviews objectatindex:0] setshowshorizontalscrollindicator:no]; [(uiscrollview*)[self.webview.subviews objectatindex:0] setshowsverticalscrollindicator:no]; [self.webview.scrollview flashscrollindicators]; self.webview.frame=self.view.bounds; self.webview.opaque = no; self.webview.backgroundcolor = [uicolor whitecolor]; self.webview.scrollview.scrollenabled = yes; }
in viewdidload method invoke later as,
[self initwebview ];
Comments
Post a Comment