English 中文(简体)
缩略语 视力在轮值/改变景观时具有额外高度
原标题:iPhone UIScrollView ContentSize has extra height when rotating/converting to landscape

做些 iPhone井大.。 然而,我有一份电离层电离层电离层电离层的电离层电离层电离层,但我轮到地貌时总是在电梯高度有100个或100个以上的颜料。 我不想让用户能够roll开迄今为止的内容。

是否有任何其他人存在这一问题或知道解决办法?

预先感谢

Michael M.

问题回答

我也遇到了同样的问题。 在我的案件中,我正在通过UIScroll 意见,试图动态计算其内容。 在通过次调查时,我发现两个神秘的形象。 各项分意见(我没有补充)中的意见,这些分意见加起来就达到100个。 由此可见,这两张图像实际上是滚动指标,自动添加到滚动表上。

我的解决办法是建立一个集装箱观察组,请打电话给集装箱观察组,在它中,我提出了滚动观点。

在该集装箱内 观点一凌驾于方法上。

- (void)addSubview:(UIView *)view {
    [_addedSubviews addObject:view];
    [_scrollView addSubview:view];
}

- (void)willRemoveSubview:(UIView *)subview {
    [_addedSubviews removeObject:subview];
    [_scrollView willRemoveSubview:subview];
}

现在,你可以增加计算规模的方法。 此时,我们通过称为“补充调查”的阵列,而不是“滚动观点”的表象,因为我们知道,“附加意见”中的观点只是我们所补充的观点。 由于这一点,我们避免通过滚动指标和不意味着:

最后,只是通过和计算 lo。

- (CGSize)desiredContentSize {
    for(UIView *mySubviews in _addedSubviews) {
        // Calculate size
    }
    // Return size
}

Zath有一个有趣的解决办法。 我已陷入类似境地。

我要说的是,在转向景观之后,你不再更新内容,但内容应该相同。

具有讽刺意味的是,我现在就有一个相反的问题。 然而,在经过学习后,必须实现自动化。 提供给是的,并确保所有4个超级概览都拥有同样的财产,最终保留了“变迁”空间。

在拖拉后跑的帐篷,最后,你会拿到你想要的东西,除非你想要顶点在超过0的同一地点停留。





相关问题
How to change out-of-focus text selection color in Xcode?

Okay, I ll bite. I ve got really pleasant code/window colors set up in Xcode. Ordinarily, my selection color is very visible. When I am doing a project search and iterating through the results, ...

Iphone NSTimer Issue

Hi I am new to objective c. I am trying to make an app for iphone. I have a button on my view, and the click on which the function playSound is called. This is working properly. It does plays the ...

Include a .txt file in a .h in C++?

I have a number of places where I need to re-use some template code. Many classes need these items In a .h could I do something like: #include <xxx.txt> and place all of this code in the ....

Iterating over string/strlen with umlauted characters

This is a follow-up to my previous question . I succeeded in implementing the algorithm for checking umlauted characters. The next problem comes from iterating over all characters in a string. I do ...

Xcode open two editor windows with same file

Is it possible to open the same file in two separate windows in Xcode. I can open a file in one window and the same file in the main Xcode editor window, but I wanted two separate fulltime editor ...

Forcing code signing refresh in Xcode

In our environment, we share resources across multiple projects and platforms. When building for iPhone, only a subset of those resources are needed. Since that subset is still considerable, we have ...

热门标签