PDA

View Full Version : TableView




Nnavick
Feb 2, 2011, 03:49 PM
Hi
How do i Scroll down automatically the table view when I pressed a button?
I know that there is "ScrollToTop" but there is no to bottom.

Thanks



hayesk
Feb 2, 2011, 04:46 PM
A tableview is a subclass of uiscrollview so you should be able to use scrolltorect:

Get the content size of the tableview, then make a rect at the bottom and scroll to that.

cnstoll
Feb 2, 2011, 04:50 PM
There are table UITableView methods for scrolling a specific row to the top, middle, or bottom of the visible area on screen (for purposes such as supporting the "next" button on the built in keyboard, or whatever else you think of).

scrollToRowAtIndexPath

http://developer.apple.com/library/ios/#documentation/uikit/reference/UITableView_Class/Reference/Reference.html