在 Xcode 4 的 Interface Builder 中滚动 UIScrollView

Scrolling through UIScrollView in Interface Builder for Xcode 4(在 Xcode 4 的 Interface Builder 中滚动 UIScrollView)

本文介绍了在 Xcode 4 的 Interface Builder 中滚动 UIScrollView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我看来,这似乎是一个常见问题,但我似乎无法在任何地方找到答案.这个问题似乎解决了这个问题,但我可以'似乎解决方案无法正常工作,我不确定它指的是 Xcode 4.

This seems to me as though it would be a common problem, but I can't seem to find the answer anywhere. This question seems to address the issue, but I can't seem to get the solution to work and I'm not sure it's referring to Xcode 4.

在 Xcode 4 中使用 Interface Builder 并使用 UIScrollView 时,有没有办法在 Interface Builder 本身中向下滚动视图以查看/添加/编辑不在可视部分的控件屏幕的?我已经设法使用箭头键向下推了几个控件,但现在我看不到它们,因此无法在 Interface Builder 中操作它们.在 IB 中滚动视图将是一等奖,但如果有办法甚至使用下拉菜单或其他方式选择控件,以便我可以使用箭头键将它们向上推,那至少会是一些东西.谢谢.

When using Interface Builder in Xcode 4 and working with a UIScrollView, is there a way to scroll the view down in Interface Builder itself to view/add/edit controls that are out of the viewable section of the screen? I've managed to push a couple controls down using the arrow keys, but now I can't see them and therefore can't manipulate them in Interface Builder. Scrolling the view in IB would be first prize, but if there's a way to even select the controls using a drop-down menu or whatever so I can push them back up with the arrow keys, that would at least be something. Thanks.

推荐答案

只是一个有助于 Xcode4 的解决方法:

Just a workaround which helps in Xcode4:

  1. 展开位于 Interface Builder 视图左侧的对象面板(面板底部有一个小箭头).
  2. 从视图层次中拖动您的 UIScrollView 并将其放在顶层.
  3. 现在您可以调整它的大小以访问更多内容(滚动到该内容对我不起作用).
  4. 将子视图添加到滚动视图后,您需要将其重新调整为更小或与父视图相同的大小.
  5. 更改后,您需要将滚动视图放回您的层次结构中所属的位置

这篇关于在 Xcode 4 的 Interface Builder 中滚动 UIScrollView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:在 Xcode 4 的 Interface Builder 中滚动 UIScrollView

基础教程推荐