开发者

UIwebview content is not loading properly

I got a pretty weird thing, am using UIWebView in one of my apps, but while the device is being rotated to landscape mode, the UIWebView content is not loading properly.

I can see the UIWebView size as proper but the content is somehow dangling.

For the case, I checked safari in iTouch, but for them its working pretty fine.

I dunno where is the issue. I am posting it after a brief search but could not get any help either.

If any you guys kn开发者_如何学运维ow how to fix this, it will be really helpful.

Cheers,

Manoj


If your application supports all 4 orientation then in info.plist create a key for Supported interface orientations.

<key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
   // Return YES for supported orientations
   return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}

- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration 
{
   //Also you can use this method

}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜