【问题标题】:UIScrollView scroll to the bottom when status bar touched触摸状态栏时 UIScrollView 滚动到底部
【发布时间】:2013-01-17 19:19:29
【问题描述】:

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

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

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

【问题讨论】:

    标签: ios objective-c user-interface uiscrollview


    【解决方案1】:

    类似于How to detect touches in status bar。这里建议在状态栏上使用透明的 UIView 并检测触摸。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多