UIWebView定位问题

时间:2013-02-05 10:54:07

标签: ios uiwebview storyboard

我正在研究一款带有分屏网页视图的应用,以便进行比较。有没有办法保持这些的大小和位置,只是在改变方向时让内容旋转?

例如,两张照片在彼此的顶部,每张照片占据了画面的一半,然后当转向风景时,照片将并排放置,占据屏幕的一半。

由于

1 个答案:

答案 0 :(得分:0)

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

上述功能可帮助您以理想的方式制作方向,但这不会布置您的UIObject,因此如果您希望图像在纵向和横向模式下正确显示,则应设置其框架相应地在两种模式下它都将解决您的问题。