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
2
votes
1 answer

Can't combine UIImageView rotation animation and tableView section reload

I have 4 sections, each section have 2 nested rows. I open the rows by tapping on each section. Here is how my initial data looks like. It has title, subtitle and options (which is what nested rows should display): private var sections = [ …
artexhibit
  • 198
  • 3
  • 17
2
votes
0 answers

cellForRowAtIndexPath sometimes not called by reloadData?

I'm making a table which you can search for different entries. It works just fine when you search but now I want to load the tableview by pressing a button. But when running: [self.tableView reloadData]; cellForRowAtIndexPath is not getting…
user872661
  • 251
  • 2
  • 13
2
votes
1 answer

Refresh Core Data in ViewController when Modal View (2nd VC) is Dismissed

I have 2 ViewControllers: VC1 populates its tableView based on CoreData attribute isPicked, which is bool and show only items with true state. VC2 is a second Modal (not Full Screen) View Controller which allow user to change the state of isPicked…
artexhibit
  • 198
  • 3
  • 17
2
votes
2 answers

Why can't I call reloadData AND deselectRowAtIndexPath in viewWillAppear:animated at the same time?

I have a UITableView with cells that push viewControllers onto the stack when selected. The child viewControllers take user input and then pops off the stack. When the child viewController is popped, I want the parent tableView to update the value…
Matt Miller
  • 1,421
  • 1
  • 15
  • 24
2
votes
0 answers

collection view arrow button changes every reload data-which create unequal

edit the question- in the storyboard the uibutton's image changes according to selected and default state, and even in loading not all buttons look same *@IBAction func topButtonTouched(_ sender: UIButton) { if let delegate =…
moranl
  • 21
  • 2
2
votes
3 answers

why doesn't "[self.tableView reloadData]" ensure I see the latest row for data I just added to a UITableView? (code included)

Why doesn't "[self.tableView reloadData]" ensure I see the latest row for data I just added to a UITableView? (code included) That is after comign back from a AddItem controller to this delegate method I: update the core data repository with the…
Greg
  • 34,042
  • 79
  • 253
  • 454
2
votes
2 answers

Decoded JSON fields give only nil values, cannot be stored into variables

Here is the JSON I need to decode, a picture of it is available in the link below as well as the text (formatting wont work so it looks ugly). I am pretty sure I represented it correctly with my structs. { "success": { "total": 1 …
orbek1815
  • 43
  • 3
2
votes
3 answers

ReloadData doesn't fire cellForRowAtIndexPath

I know this has been asked over and over again. I've tried all given solution but still it didn't work. I have set the datasource and delegate to my table view and also set it to my pointers. Here is my code: - (NSInteger)tableView:(UITableView…
sicKo
  • 31
  • 4
2
votes
3 answers

UITableView refreshing problem

I am trying to refresh an UITableView every time I navigate the the view that contains this Table. I Have a ViewController and a custom UITableViewController that manages to set the Table Correctly when the application starts, using an…
Mathieu C.
  • 453
  • 1
  • 4
  • 10
2
votes
1 answer

CollectionView reloaddata() after value change

I have a problem updating my CollectionView after values in an array changed. I made a short gif of my problem. As you can see I can add goals for both teams in my soccer app. When I press the game statistic button for the first time, the result…
2
votes
1 answer

Why reload data causes crash when scrollToRow is called after it?

Reloading data causes crash when scrollToRow is called after it. I have to write this code in DispatchQueue.main.async but, why? Why should I say to switch to the main queue when I have been in the main…
Fattaneh Talebi
  • 727
  • 1
  • 16
  • 42
2
votes
4 answers

Not scrolling smooth on UICollectionViewController for large data loading

I am new to iOS and I'm trying to load data in collectionviewcontroller. Data is loading and scrolling for less data. But scroll get stuck when loading large data. But as data in my collection gets increasing, its scrolling becomes rough and after…
2
votes
2 answers

UITableView: reloadRows(at:) takes two hits for table to be updated and scroll every time

I have a table view (controller: MetricsViewController) which gets updated from a CoreData database. I have used prototype cells (MetricsViewCell) which I have customized for my needs. It contains a segmented control, a UIView (metricsChart, which…
Manganese
  • 650
  • 5
  • 26
2
votes
3 answers

Delay reloadData on UITableView

I have a UITableView. On the tap of a button i want to display my custom view, then, once the view is visible, remove a particular item from the tableview. The custom view hides the tableview so i would like the remove to occur after this new view…
joec
  • 3,533
  • 10
  • 60
  • 89
2
votes
1 answer

Alternative for UITableView's reloadData()?

I have a UISlider in my table view's reusable cell. As soon as the value changes, a custom method valueChanged() gets called, which triggers the table view's reloadData() method. The reloadData() calls cellForRowAtIndexPath and as soon as the cell…
Freddy Benson
  • 735
  • 4
  • 11
  • 30