Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9095069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:30:29+00:00 2026-06-16T23:30:29+00:00

I can call collectionView:cellForItemAtIndexPath: to get a specific cell in order to modify that

  • 0

I can call collectionView:cellForItemAtIndexPath: to get a specific cell in order to modify that cell at any time–for instance, to update its label. I am speaking of the class instance method on UICollectionView, not the UICollectionViewDataSource method.

However, there does not appear to be a similar method for headers/footers. collectionView:viewForSupplementaryElementOfKind will return unique instances of headers/footers, instead of giving an already allocated instance. Because of this, I cannot get a pointer to a header in order to update (say) a label. I am forced to reload the section and modify it in the body of the collectionView:viewForSupplementaryElementOfKind method.

Is there a proper way to get a pointer to a specific header/footer, without resorting to a custom object cache or tags?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T23:30:31+00:00Added an answer on June 16, 2026 at 11:30 pm

    As far as I know there isn’t (it took until iOS 6 for there to be an equivalent call for a UITableView, footer/headerViewForSection).

    If I had to guess why this isn’t possible I’d say it’s because in some layouts the UICollectionView will automatically re-layout and adjust the supplementary views, so adjusting view contents ‘on the fly’ could be problematic. However, assuming UICollectionView doesn’t do anything funny like copying views you should probably be able to hold your supplementary views in a separate array and modify them that way – that said, no guarantees this won’t introduce some odd or strange behaviour (same for your suggestion of using tags and going into the collection view hierarchy).

    So the short answer is no – there isn’t a method that supports this in the API. If you had a compelling use case it’s probably worth filing a feature request through Apple’s bug reporter though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that you can call an instance method that executes for each object.
is there something that can call a -(void) every time a view shows. I
I noticed that you can call Queue.Synchronize to get a thread-safe queue object, but
I understand that I can call ToString().IndexOf(...), but I don't want to create an
Using a delegate I can call any function asynchronously. From the documentation I understand
(Yes I know I can call Java code from Scala; but that is pointless;
I saw that you can call from JS to function of PhoneGap on the
Multiply users can call store procedure(SP) , that will make some changes to mytable
we can call the Array method in the top level like this Array(something) that
I can call Get<int>(Stat); or Get<string>(Name); But when compiling I get: Cannot implicitly convert

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.