I am new to iphone development.In my app, i want to display the web view in device with c portrait Orientation.It should also support landscape orientation. I used the below method but there is no expected output.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait ||
interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation ==
UIInterfaceOrientationLandscapeRight);
}
please guide me.Please help me out.Thanks
I think you have set the fixed frame for webview.That will not help while implementing orientation chage
Try This:
Use this code for displaying the web-view.Change the stack-overflow URL with your URL;
To support orientation
For web-view change with orientation
Hope the above will satisfy your requirement. All the best.
If you want to support any orientation then just return
YES
.