Returns a reusable header or footer view located by its identifier.
SDKs
- iOS 6.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- UIKit
Declaration
- (_ _kindof UITable View Header Footer View *)dequeueReusableHeaderFooterViewWithIdentifier:(NSString *)identifier;
Parameters
identifierA string identifying the header or footer view to be reused. This parameter must not be
nil.
Return Value
A UITable object with the associated identifier or nil if no such object exists in the reusable view queue.
Discussion
For performance reasons, a table view’s delegate should generally reuse UITable objects when it is asked to provide them. A table view maintains a queue or list of UITable objects that the table view's delegate has marked for reuse. It marks a view for reuse by assigning it a reuse identifier when it creates it (that is, in the init method of UITable).
You can use this method to access specific template header and footer views that you previously created. You can access a view’s reuse identifier through its reuse property.