问题与添加使用自动布局滚动查看 [英] Issue with adding Scroll View with Autolayout

查看:263
本文介绍了问题与添加使用自动布局滚动查看的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我跟了很多公认的答案和很多教程知道添加滚动视图与自动布局的方式,但没有人帮助我。因此,我现在张贴,作为一个问题。

I have followed many accepted answers and many tutorials to know the way to add scroll view with Auto Layout but none of them helped me. Thus, I am now posting that as a question.

我的答案和指导中发现的共同点是,他们没有使用导航栏和他们都显示可以来在屏幕的范围内的内容,但我们需要滚动时的内容不能的范围内来屏幕。我曾与这个问题一起分享的形象和我的问题是,我该怎么让这对iPhone 5的屏幕上滚动视图与自动布局的帮助。

The common thing I found in the answers and tutorial is that none of them used Navigation Bar and the content which they are showing can come within the bounds of the screen but we need to scroll when content can't come within the bounds of screen. I have shared the image along with this question and my question is how can I show this on Scroll view on iPhone 5 screen with the help of Auto Layout.

在这里输入的形象描述

我工作在iPad应用程序,我已经设置了以下限制。

I am working on an iPad Application and I have set the following constraints.

请参阅下面的这些图像中的:

Please see them in an image below:

在这里输入的形象描述

推荐答案

试试这个约束......

try this constraints...

对于顶栏

  pinned all 4 edges 
  and give height constraint  

了滚动

 pinned all 4 edges  

为了查看里面滚动视图

pinned all 4 edges
equal width to superview
and height constraint

这篇关于问题与添加使用自动布局滚动查看的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆