Reputation: 1
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 know how to fix this, it will be really helpful.
Upvotes: 0
Views: 554
Reputation: 12500
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
}
Upvotes: 0