Prevent uitableView from reloading
I am using uitableView
in my application and I want to prevent it from reloading in different cases: 1. When I present another modal look at it. 2. The row is selected.
I do not call [tableview reloadData]
in viewWillAppear
or viewDidAppear
. Is there a way to prevent this reboot?
source to share
Thank you for your responses. This does not trigger a reboot. I used auto layout and the constraints set on the tableview force it to reload and change position when another view appears. Solution: When making os presentation selection, use this command to prevent setting the position for constraints:
tableView.translatesAutoresizingMaskIntoConstraints = YES;
source to share
Here's a way you can "track" when function calls come from:
- Add a breakpoint in the header of the datasource table view function
- Then start the app with the debugger open and when the breakpoint is pointing at the function header, click to the right of Thread 1 and you can see how this breakpoint was called / reached
Hope this helps you and I hope this was caused by you the programmer because as you can see in my example there was only one step I took. How can I tell the blue person icon next to6 -[ViewController viewDidLoad]
source to share