0

我试图弄清楚当状态栏被触摸时如何滚动到 UIScrollView 的底部。我熟悉 UIScrollView 中的 @property(nonatomic) BOOL scrollsToTop 方法,但这不是我要找的。

我这里也有这个方法,当视图加载时会自动滚动到底部。有什么想法吗?

-(void)scrollToBottom{
CGPoint bottomOffset = CGPointMake(0, scroller.contentSize.height - scroller.bounds.size.height);
[scroller setContentOffset:bottomOffset animated:YES];
}
4

1 回答 1

1

类似于如何检测状态栏中的触摸。这里建议在状态栏上使用透明的 UIView 并检测触摸。

于 2013-01-17T19:40:23.147 回答