12

i want to dynamically update the content of the header information in my UIColectionView but i do not want to reload the whole section because this i done very frequently.

Any ideas for an elegant solution?

Thanks

user3173911
  • 121
  • 1
  • 3

1 Answers1

5

You can call setNeedsDisplay on the UIView (your header view) rather than reloadData or reloadSections: on the UIColectionView.

Greg
  • 24,353
  • 5
  • 47
  • 60
  • Possible but i do not want to store references to all my header views. – user3173911 Jan 09 '14 at 12:48
  • 1
    So I afraid there is no build in method to refresh just header. You can create reference and call setNeedsDisplay (I recommended you to do that) or you can foreach all subviews in your collection view and if view is your header view (you can set up a tag and identify it by that) call setNeedsDisplay. – Greg Jan 09 '14 at 12:50