user784625
user784625

Reputation: 1938

UITableView control Reloading Header

I have a problem, I have added to the header of the UITableView a banner from the internet, the problem is that every reload of the banner give me a new one, my question is can I control the reloading issue of the tableview, I don't want every time that when I scroll the table view I get dynamic reloading, I want to load all the tableview once.

thanks,

Upvotes: 0

Views: 767

Answers (1)

Florian Mielke
Florian Mielke

Reputation: 3360

You can not prevent UITableView of reloading the header file. Therefore you have to create a UIView subclass (e.g. MyHeaderView) that represents your header view. MyHeaderView loads the data from the internet and stores all necessary information (images, text, ...) in ivars. It also has a method to reload the data from the internet so you can call it if necessary. Finally you assign MyHeaderView to the UITableView's setTableHeaderView:.

Upvotes: 1

Related Questions