She*_*lam 8 iphone cocoa-touch objective-c uitableview
我想在点击按钮时滚动我的UITableView 2单元格.向下移动的总高度为100px.我怎么能做到这一点?
Tom*_*ing 11
设置contentOffset属性.
[aTableview setContentOffset:CGPointMake(0,100)];
Run Code Online (Sandbox Code Playgroud)
如果您知道要滚动的单元格,请使用scrollToRowAtIndexPath:atScrollPosition:animated:
否则使用contentOffset属性或按像素滚动http://developer.apple.com/IPhone/library/documentation/UIKit/Reference/UIScrollView_Class/Reference/UIScrollView.html#//apple_ref/doc/uid/TP40006922-CH3-SW26
| 归档时间: |
|
| 查看次数: |
6363 次 |
| 最近记录: |