Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

prevent uitableView reloading

I am using a uitableView in my application and I want to prevent reloading it in different cases: 1. when I present another modal view on it. 2. row selection happens.

I am not calling [tableview reloadData] in viewWillAppear or viewDidAppear. Is there anyway to prevent this reloading?

like image 843
Niloufar Avatar asked Oct 19 '25 04:10

Niloufar


2 Answers

Here is a way you can "track" where function calls come from:

example

  1. Add a breakpoint on the function header of the table view's datasource
  2. Then run your application with the debugger open and when the breakpoint points to your function header, click to the right of the Thread 1 and you will see how this breakpoint was called/reached

I hope this helps you and hope it was something called by you, the programmer because as you can see in my example, there was only one step that was done by me. How i can tell was the blue person icon next to 6 -[ViewController viewDidLoad]

like image 197
ErickES7 Avatar answered Oct 21 '25 20:10

ErickES7


  • (void)reloadData; // reloads everything from scratch. redisplays visible rows. because we only keep info about visible rows, this is cheap. will adjust offset if table shrinks
    maybe can do it in change DataSource
like image 23
bigCat Avatar answered Oct 21 '25 20:10

bigCat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!