ScrollView无法在iOS7中使用AutoLayout [英] ScrollView not working in iOS7 with AutoLayout

查看:98
本文介绍了ScrollView无法在iOS7中使用AutoLayout的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天我花了几个小时但仍然没有答案非常简单(我认为应该是这样)问题:如何在iOS7中使用自动布局功能进行任何可滚动的操作。
我在视图中添加了ScrollView(我正在使用Storyboard)。然后我在这个ScrollView中添加了多行标签。然后我尝试了所有我在互联网上找到但没有运气的东西。文字不滚动。它杀了我,伙计们:(((请帮我一下,也许还有一些简单的代码片段。

Today I've spend a few hours but still have no answer on very simple (I think it should be so) question: how to make anything scrollable in iOS7 with auto layout feature on. I added ScrollView into the View (I'm using Storyboard). Then I added multiline Label to this ScrollView. Then I tried all that I could found in Internet but with no luck. Text not scrolling. It's killing me, guys :(((. Help me please maybe with some simple code snippet.

谢谢!

推荐答案

如果在ScrollView和Label之间添加约束,ScrollView的内容大小将自动调整,文本将滚动:

If you add constraints between ScrollView and Label, ScrollView's content size will adjust automatically and text will scroll:

这篇关于ScrollView无法在iOS7中使用AutoLayout的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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