Questions tagged [reloaddata]

This tag covers reloadData methods on UITableView, UICollectionView and NSTableView in Apple's UIKit and AppKit frameworks. Do not use it outside the context of Apple frameworks.

Initially this was supposed to cover reloadData on UITableView on Objective-C, but by now it has also been used for all kinds of issues regarding reloading data.

Don't do this, let's leave this to UITableView.

658 questions
200
votes
18 answers

How to tell when UITableView has completed ReloadData?

I am trying to scroll to the bottom of a UITableView after it is done performing [self.tableView reloadData] I originally had [self.tableView reloadData] NSIndexPath* indexPath = [NSIndexPath indexPathForRow: ([self.tableView…
Alan
  • 8,681
  • 12
  • 48
  • 90
77
votes
10 answers

UITableview reloaddata with animation

I have a UITableView which is populated from array and a drop down list. If I select any row of drop down list the array will be inserted with new values and tableview should get reloaded. How to animate the tableview with new array contents?…
Naveen Pathiyil
  • 786
  • 1
  • 6
  • 8
61
votes
13 answers

How to keep UITableView contentoffset after calling -reloadData

CGPoint offset = [_table contentOffset]; [_table reloadData]; [_table setContentOffset:offset animated:NO]; //unuseful // __block UITableView *tableBlock = _table; // [self performBlock:^(id sender) { // [tableBlock…
avincross
  • 613
  • 1
  • 6
  • 5
42
votes
10 answers

Iphone - when to calculate heightForRowAtIndexPath for a tableview when each cell height is dynamic?

I have seen this question asked many times but astoundingly, I have not seen a consistent answer, so I will give it a try myself: If you have a tableview containing your own custom UITableViewCells that contain UITextViews and UILabels whose height…
JohnRock
  • 6,475
  • 12
  • 50
  • 61
37
votes
6 answers

Swift UITableView reloadData in a closure

I believe I'm having an issue where my closure is happening on a background thread and my UITableView isn't updating fast enough. I am making a call to a REST service and in my closure i have a tableView.reloadData() call but it takes a few seconds…
Jeef
  • 25,082
  • 16
  • 71
  • 136
35
votes
3 answers

TableView reloadData vs. beginUpdates & endUpdates

I got a tricky problem regarding updating my TableView, i get different results using different methods of updating it, let me explain: Situation 1: I use [tbl reloadData]; where tbl is my TableView, to update the TableView - works as…
Tobias Tovedal
  • 681
  • 2
  • 8
  • 14
34
votes
8 answers

Remembering scroll position on UITableView

I have a bit of a problem with my iOS app in xcode. I have a UITableView that loads a few hundred cells. When I scroll down to a specific cell and drill down to detailedviewcontrollers and return again the master view table has returned all the way…
mylogon
  • 2,283
  • 2
  • 24
  • 39
24
votes
3 answers

Reload section method in swift 3?

I have code written in objective c.I want to convert this code into the swift3 code. [_expandableTableView reloadSections:[NSIndexSet indexSetWithIndex:gestureRecognizer.view.tag] withRowAnimation:UITableViewRowAnimationAutomatic]; After converting…
TechChain
  • 7,104
  • 20
  • 81
  • 193
23
votes
5 answers

UICollection view reloadData cause recreate visible cell

When I call reloadData method of UICollectionView it cause all visible cell to blink. I found that reason of this is recreation of all visible cells, while UITableView return visible cell in – tableView:cellForRowAtIndexPath: method after reload…
abagmut
  • 731
  • 1
  • 6
  • 22
23
votes
3 answers

Refreshing a UICollectionview

Does anyone know how to reload/refresh a UICollectionView while the collection view is being displayed? Basically I'm looking for something similar to the standard reloadData method for a UITableview.
SNV7
  • 2,403
  • 5
  • 23
  • 36
22
votes
11 answers

How to filter UICollectionView and keep keyboard up?

I've added a UISearchBar to a UICollectionView and in the delegate searchBar:textDidChange: filter my model and call [collectionView reloadData]. reloadData (as well as reloadSection, etc) wants to take away firstResponder from the searchbar's…
Mike Katz
  • 2,020
  • 1
  • 17
  • 25
21
votes
5 answers

[tableView reloadData]; doesn't work until I scroll the tableView

I have a simple app that downloads search results in XML when the user types in a UISearchBar. The download+parsing is threaded and once done it fires an NSNotification to tell the ViewController with the table view to [tableView reloadData]; Here…
Maciej Swic
  • 10,562
  • 8
  • 46
  • 64
20
votes
5 answers

UITableview Scrolls to Top on Reload

I am facing problem in my app - you can post and edit your favorite places. After posting a post, or editing a specific post (UITableViewCell), UITableview is reloaded. My problem is: the UITableview scrolls to the top after reloading. But that's…
debbiedowner
  • 338
  • 1
  • 3
  • 10
19
votes
3 answers

reloadData only on tableView visible cells

Is that possible? To reload only the cells that are visible in order to do it more efficient.
Samui
  • 1,344
  • 3
  • 14
  • 27
18
votes
5 answers

Reload a table view's data without clearing its selection state

I have a table view with selectable rows. When I reload the table view some new rows might be added (or removed) and some labels in the table view's cells might change. That's what I want to achieve by calling [tableView reloadData]. Unfortunately…
Mischa
  • 12,670
  • 7
  • 51
  • 94
1
2 3
43 44