uiwebview - How to resize webview correctly in landscape mode in iPhone? -



uiwebview - How to resize webview correctly in landscape mode in iPhone? -

i add together navigationbar, webview , toolbar(from top bottom) subviews of viewcontroller's view. want navigationbar , toolbar's height shrink little in landscape orientation utilize autoresizingmask create height flexible. (uiviewautoresizingflexibleheight create navigationbar , toolbar's height shrink 44 around 30):

webnavbar.autoresizingmask = uiviewautoresizingflexiblewidth | uiviewautoresizingflexibleheight | uiviewautoresizingflexiblebottommargin; webtoolbar.autoresizingmask = uiviewautoresizingflexiblewidth | uiviewautoresizingflexibleheight | uiviewautoresizingflexibletopmargin; webview.autoresizingmask = uiviewautoresizingflexiblewidth | uiviewautoresizingflexibleheight;

now found when rotate device landscape mode, there 2 blank white bars on top , bottom of webview(each blank bar's height 44-30). navigationbar , toolbar appear in right position. there way resize webview , fill gaps?

are sure autoresizing margins set correctly webview? do:

-(void)willrotatetointerfaceorientation:(uiinterfaceorientation)tointerfaceorientation duration:(nstimeinterval)duration { webview.frame = self.view.frame; }

no thought if work worth shot.

iphone uiwebview resize landscape

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -