Gypsa
Gypsa

Reputation: 11314

TableView scrolls to bottom and perform some action

In my application there is a table view.What I want to do is when I scrolls the table view and when it come to its end row I want to perform some action. Please tell me which approach should I use to do this. Thanks in advance!!

Upvotes: 1

Views: 266

Answers (2)

Yorxxx
Yorxxx

Reputation: 679

I think (don't the docs up here) but there is no method within the UIScrollViewDelegate that handles the scrolling to the bottom. There is when scrolling to top, but can't remember if there is scrolling to bottom. Check it please.

If not, the easy way is just to check the indexpath.row at cellForRow. If it is your last row, call whatever action you want.

Upvotes: 1

Iqbal Khan
Iqbal Khan

Reputation: 4617

I think you should make a check in

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)

when it loads the last row then call that method.

I think this will work. because table does not load all data at once but i loads data when user scroll

Upvotes: 1

Related Questions