English 中文(简体)
增量
原标题:Add content to the top of a scrollview

我不想重开在电算中的建筑。 在我点击“上载”时,我需要把les子添加到底部,并预先排在上。

My main issue is that I don t know how to push the rest of the talk bubbles down when i load more to the top. It s been quite a struggle for me.

I m在UIScrollView的分流中工作,i ve为此添加了“内部意见”。

什么是把标签(泡沫)添加到底顶层和正值的消极价值上。 I 储存在“顶级劳动力”和“下层劳动力”中的最后职位

谁能帮助? 我的法典

CGFloat whereToScroll = 0.0;
CGFloat topOfContent = self.topLabelsPosition.origin.y;
CGFloat bottomOfContent = self.labelsPosition.origin.y;

CGFloat fullHeight = fabs(bottomOfContent)+fabs(topOfContent);

[innerView setFrame:CGRectMake(0,topOfContent,self.frame.size.width, fullHeight)];

if(is_adding_to_top) {
    whereToScroll = topOfContent;
} else {
    whereToScroll = bottomOfContent;
}

[self setContentSize:contentSize];
CGPoint point = {0, whereToScroll};
[self setContentOffset:point];

My "innerView" does not get bigger on top, but on bottom - i can tell by the background color. And my scrollview won t scroll to the -300.00 (topOfContent) like i want it to.

我愿意重写任何东西,如果你愿意帮助的话,我会ear一耳。

预言如此之多地感谢你!

最佳回答

如果你仔细研究这些讯息的话。 当它装上顶上的新泡沫时,它就会 does。 他们只是联系。 与在底部出现的新信息相反,新信息在底部传播。

我认为,如果把它们加到(0,0)之后,就把在内容观点中已经出现的所有事情推向下,那么,它们就不了。 因此,试图不增加——xxx y,而只增加0+ y,并用同样数额调整已经缩小的所有范围。

希望这一帮助。

问题回答

暂无回答




相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

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 ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签