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.

678 questions
3
votes
1 answer

Why UITableView reloadData can not in animate block?

Before, I don't know why, when I reloadData my tableVIew, it takes a very long time. I have test Log to prove, shows the slow is not because the network: 2016-12-29 14:50:20.958 Eee[1572:25220] lml-info-vc-test-net-began 2016-12-29 14:50:20.958…
aircraft
  • 25,146
  • 28
  • 91
  • 166
3
votes
1 answer

Reloading TableView from CollectionViewCell

Does anyone have idea how to reload TableView that's inside of CollectionViewCustomCell? I have an IBOutlet of that Table and the only way to access that Table is inside cellForItemAtIndexPath method where I can access my CollectionViewCustomCell…
3
votes
1 answer

tableView.reloadRows flickers if called too quickly after another table update

This video demonstrates the issue I'm visually having. Every so often, I have this block called: self.tableView.beginUpdates() self.tableView.insertRows(at: [indexPath], with: rowAnimation) self.tableView.endUpdates() self.tableView.scrollToRow(at:…
David
  • 7,028
  • 10
  • 48
  • 95
3
votes
2 answers

UITableView reloadData many times cause memory leak and slow down application

I made a mistake when using Leaks instrument that I thought total living objects is byte of memory, so I updated my post! [Updated] Hello All, I am facing with a problem that: My application present realtime data by using UITableView which may…
Son Nguyen
  • 3,481
  • 4
  • 33
  • 47
3
votes
0 answers

Table View Cell Content Repeating While I reload data

My table view cell is repeating when scroll while waiting to reload Data . After reload all item are reset and all repeating content are remove . Here a video showing the problem , anyone know why and how can i fixed it ? As you can see in the video…
user6005637
3
votes
1 answer

UICollectionView cellForItemAtIndexPath not called after numberOfItemsInSection returns nonzero item number

Is there any reason that cellForItemAtIndexPath would not get called after numberOfItemsInSection gets called and returns a nonzero number? Would a reloadData from a completion block affect this? I'm running into an issue in which I am trying to…
BHendricks
  • 4,423
  • 6
  • 32
  • 59
3
votes
2 answers

reloadRowsAtIndexPaths updates the contentOffset Of the table view

I am trying to reload a particular row from the tableview but the contentOffset of the tableview is reset to (0, 0) after the reload. I tried to add [tableview beginUpdates] and [tableview endUpdates] around the reloadRowsAtIndexPaths but didn't…
Jay
  • 31
  • 1
  • 5
3
votes
1 answer

Prevent header from being updated after calling reloadData?

I have a UITableView with a custom header that maintains some state. When I call reloadData to change/update the data in the UITableView, the header gets reloaded too. Is there any way to prevent this behavior in order to maintain state in the…
john
  • 1,189
  • 2
  • 15
  • 20
3
votes
3 answers

When screen rotation ReloadData()

I can not update my custom view when you turn the screen of my device. I tried to do this: override func viewDidLoad() { super.viewDidLoad() var myCustomView = Customview() self.view.addsubview(myCustomView) } …
Paul
  • 43
  • 1
  • 8
3
votes
1 answer

UITableView not being displayed after reloading data

I have a strange problem with my tableView. I load data via JSON into my tableView. While the JSON is being requested from the web in another class, I show an activity indicator view in my current view and the tableView is hidden. I ve got a…
Christoph Beger
  • 135
  • 2
  • 14
3
votes
3 answers

Using an animation with reloadData

In my UITableView instance, I'm moving the cell to index:0 and reloading the data. The problem is that the cell "snaps" to the top (due to the reloadData, i think). I'm wondering if i can move the cell up, then apply reloadData a few seconds later.…
Brian
  • 73
  • 2
  • 11
3
votes
5 answers

Always show from the first index of the table?

I have a UITableView in one of my view. Lets say the tableView has 100 index. If I scroll down and select 50th index, its pushing to another view. So what I want is, if I pop back to tableView view from second view, the tableView should show from…
NSUserDefault
  • 1,794
  • 1
  • 17
  • 38
3
votes
3 answers

ReloadData for UITableView not working; tableView returns NULL when logged

I am calling a method in my TableViewController class from another class. To call the method of displaying the tableview, I do this: TableViewController *tableVC = [[TableViewController alloc]init]; [tableVC setTableViewContent]; then in…
Spenciefy
  • 892
  • 11
  • 33
3
votes
2 answers

UICollectionView didselect doesn't work

Everytime I press a cell I want the cell to change image: - (void)collectionView:(UICollectionView *)collectionView didDeselectItemAtIndexPath:(NSIndexPath *)indexPath { if ([[arrayOfImages objectAtIndex:indexPath.item] isEqual:…
3
votes
1 answer

UICollectionView takes a long time to refresh data

here's a challenge for you all... I have an UICollectionView inside my UIViewController witch is loading correctly. I also have a custom UICollectionViewCell class witch contains an UIButton. I retrieve a NSArray from my server with some UIImage…
Jorge Ramos
  • 891
  • 10
  • 21