Pressing the cancel button on the UISeachBar in the UITableView loops forever and continues to consume memory. Here are my conditions and conclusions.
1) Using a custom view for the background view of the table
2) A long list of elements obtained from the master data
3) Start the search, enter a few letters - everything is in order. I get the results that I need
4) Hit cancel - and the wait begins
I used the processor profiler for debugging and found that it was stuck in a call to [layoutsbelowifneeded].
I removed the custom view with the background image and everything works fine.
Any reasons for this?
UPDATE:
Here is the code I'm using:
UIImage *image=[UIImage imageNamed:@"tableview_background.png"];
UIImageView *view=[[UIImageView alloc] initWithImage:image];
wltvc.tableView.backgroundView=view;
source