ViewRegistration
public struct ViewRegistration : Hashable, Sendable
Describes all information needed to register a view for reuse with a UICollectionView.
-
The view reuse identifier.
Declaration
Swift
public let reuseIdentifier: String -
The type of view to register.
Declaration
Swift
public let viewType: ViewRegistrationViewType -
The view registration method.
Declaration
Swift
public let method: ViewRegistrationMethod -
Initializes a
ViewRegistration.Declaration
Swift
public init( reuseIdentifier: String, viewType: ViewRegistrationViewType, method: ViewRegistrationMethod )Parameters
reuseIdentifierThe view reuse identifier.
viewTypeThe type of view to register.
methodThe view registration method.
-
Convenience initializer for a class-based cell.
Declaration
Swift
public init(reuseIdentifier: String, cellClass: AnyClass)Parameters
reuseIdentifierThe cell reuse identifier.
cellClassThe cell class.
-
Convenience initializer for a nib-based cell in the main bundle.
Declaration
Swift
public init(reuseIdentifier: String, cellNibName: String)Parameters
reuseIdentifierThe cell reuse identifier.
cellNibNameThe nib name for the cell.
-
Convenience initializer for a class-based supplementary view.
Declaration
Swift
public init(reuseIdentifier: String, supplementaryViewClass: AnyClass, kind: String)Parameters
reuseIdentifierThe view reuse identifier.
supplementaryViewClassThe view class.
kindThe supplementary view kind.
-
Convenience initializer for a nib-based supplementary view in the main bundle.
Declaration
Swift
public init(reuseIdentifier: String, supplementaryViewNibName: String, kind: String)Parameters
reuseIdentifierThe view reuse identifier.
supplementaryViewNibNameThe nib name for the view.
kindThe supplementary view kind.
View on GitHub