English 中文(简体)
为什么对《美国国际法评论》的“继续适用”进行更新不会产生任何效果?
原标题:Why do updates on "contentOffset" of a UIScrollView make no effect?

我有一份可纵向和横向发展的UIScroll书。 这种观点充满了多州,每个州都有自己的宽度(但所有高度相同)。

当其中一个州被利用时,便会把一个类似于斜体的界面带上生命。 如果这一接口延伸到选定的纽特州,那么整个滚动观点必须滚动,使纽特再次出现。

当Y调换滚动观点的内容被限制时,我会像预期的那样行事(这一限制可以是0,也可以是视高峰)。 但是,如果所抵消的内容位于中间垂直位置,那么光滚动似乎就会出现。

首先,我尝试了以下做法:

CGPoint newOffset = CGPointMake(self.scrollView.contentOffset.x + horizontalVar, 
                                self.scrollView.contentOffset.y); 

[self.scrollView setContentOffset: newOffset animated: YES];

正如我提到的那样,哪些工作不成功。

然后,我试图利用财产集束手对观点进行手工分析:

[UIView animateWithDuration: 0.3 animations: ^{
   CGPoint newOffset = CGPointMake(self.scrollView.contentOffset.x +  horizontalVar, self.scrollView.contentOffset.y);

   self.scrollView.contentOffset = newOffset;
}];

这种做法产生了以下结果:如果发源地之一被利用时处于中间垂直状态,则内容抵消了最新变化,但几乎立即回到原州。

我在这个问题上没有任何其他影响。 您能否帮助我?

问题回答

或许是因为你打上了你的剪辑内容。 观点。





相关问题
How do you create UIBarButtonItems with a radio interface?

I have a UIToolbar that needs three buttons in a radio style, meaning that of the three, only one button can be pushed at a time. The documentation makes reference to the possibility of setting up ...

iPhone settings bundle

I want to allow the user to enter a valid date using the iPhone’s settings application. I have experimented with many of the PreferenceSpecifiers data node types including date. I have two issues: ...

Circular #import/@class problem in ObjectiveC

I m going to use an example to properly illustrate my confusion. I can t quite wrap my head around this. In Cocoa touch, we have UIViewController and its subclass, UINavigationController. Now, UIVC ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Cocoa-Touch: issue looping MPMoviePlayerController

I have an app which has to load some data at startup, so I want to display a splash-screen animation. I m using the MPMoviePlayerController to play a m4v file. The movie has it s background set to [...

Iphone sequential animation with setAnimationDelay

I m trying to chain animation events. The application I m coding for work has a multiple choice quiz. First you pick your multiple choice answer. The quiz view fades away. Then a label ("correct" or "...

热门标签