BackgroundViewProvider

public protocol BackgroundViewProvider

Provide a background view to be displayed behind the other contents of a cell. An implementation should maintain some internal state about the contents of the view.

  • This is where the background view should be instantiated, since this function is only called when a cell is being prepared to be dequeued.

    Declaration

    Swift

    func backgroundView() -> UIView?
  • Compare the internal state to avoid unnecessarily instantiating the background view.

    Declaration

    Swift

    func isEqualTo(_ other: BackgroundViewProvider?) -> Bool