找到你要的答案

Q:Xcode Interface Builder - Show objects out of frame?

Q:Xcode Interface Builder显示对象的框架?

I am building a vertical iPhone XIB file in the interface builder that contains a vertical scrolling ScrollView. The scrollview has about 19 buttons for a total height of about 3 times the iPhone screen's height.

This means I can't see the buttons at the bottom of the scrollview without giving the scrollview a negative Y-position setting. It gets really annoying every time I have to adjust the scrollview's Y-position just to see my buttons at the bottom of the scrollview because the XIB's frame "hides" everything that extends beyond its frame.

This has annoyed me for several years. Is there a setting somewhere that lets me see the XIB's frame (crop) boundaries, but also lets me see everything that extends beyond the frame's boundaries?? I never understood why it hides everything outside of the frame. It is restricting and slows down the work process when working with very tall ScrollViews.

Thank you for any insight!

我是包含一个垂直滚动滚动视图的界面生成器垂直iPhone XIB文件建设。ScrollView大约有19个按钮,总高度约3倍的iPhone屏幕的高度。

这意味着我不能看到按钮在ScrollView底部没有给ScrollView负坐标设置。真的非常讨厌我每次要调整滚动视图的坐标正好看到我的按钮在ScrollView底因为XIB的框架“躲”一切超出其框架。

这使我烦恼了好几年。有没有地方设置让我看到XIB的框架(作物)的界限,但也让我看到的一切超出了框架的边界?我从来不明白为什么它把一切隐藏在框架之外。它是制约和减缓工作过程与很高的滚动视图时。

谢谢你的任何洞察力!

answer1: 回答1:

Here, just do this in order to increase the visible canvas of your ViewController, that has scrollView (these metrics are simulated, so don't worry, it will not affect your view in simulator/device in any way):

enter image description here enter image description here enter image description here

在这里,只是这样做是为了增加你的视图的可见的帆布,具有滚动视图(这些指标是模拟的,所以不要担心,它不会以任何方式影响在模拟器/设备的视图):

enter image description here enter image description here enter image description here

answer2: 回答2:

It used to be possible to scroll the content view of a scroll view in IB by pressing the option, or another modifier key while the scroll view was selected and you did a scroll.

Unfortunately, I noticed that this feature broke in one of the later Xcode 6 updates, or Xcode 7 betas, and (because I’m not doing a lot of UI stuff lately) it does not seem to have been fixed again.

Please file a bug on this, because it sure won’t be fixed if the feature isn’t missed…

它可以滚动的内容视图滚动视图在IB按选项,或另一个修饰键同时滚动视图选择和你做一个滚动。

不幸的是,我发现这个功能打破了一个Xcode 6更新,或Xcode 7测试版,和(因为我最近没有做很多UI的东西)似乎没有被固定了。

请在此文件上的错误,因为它肯定不会被固定,如果该功能没有错过…

ios  iphone  xcode  scrollview  xib