MenuCollectionViewCell
@available(iOS 9.0, *)
@objcMembers
@objc(PESDKMenuCollectionViewCell)
open class MenuCollectionViewCell : UICollectionViewCell, Activable
The cell that is used in the menu.
-
Whether this cell is currently active or not. This behaves similar to
isSelected
, however we don’t useisSelected
on purpose to have better control over a cell’s selection state.Declaration
Swift
open var isActive: Bool { get set }
-
The icon image view displays an icon close to the center of the cell.
Declaration
Swift
public let iconImageView: UIImageView
-
The caption text label displays text close to the bottom of the cell.
Declaration
Swift
public let captionTextLabel: UILabel
-
A gradient view that is displayed behind the
captionTextLabel
.Declaration
Swift
public let captionGradientView = GradientView( gradientStops: [ GradientStop(color: .clear, location: 0), GradientStop(color: UIColor.black.withAlphaComponent(0.2), location: 0.4), GradientStop(color: UIColor.black.withAlphaComponent(0.6), location: 1.0) ] )
-
The background image view displays an image below the other views and across the whole size of the cell.
Declaration
Swift
public let backgroundImageView: UIImageView
-
The background dimming view will be visible when the cell is selected and
dimBackgroundImageWhenSelected
istrue
to dim the content ofbackgroundImageView
.Declaration
Swift
public let backgroundDimmingView: UIView
-
When set to
true
thebackgroundImageView
‘s content will be dimmed when the cell is selected. This property supports being set via aUIAppearance
proxy.Declaration
Swift
@objc open dynamic var dimsBackgroundImageWhenSelected: Bool { get set }
-
When set to
true
theiconImageView
‘s andcaptionTextLabel
content will be slightly dimmed when the cell is not selected. This property supports being set via aUIAppearance
proxy.Declaration
Swift
@objc open dynamic var dimsContentWhenNotSelected: Bool { get set }
-
When set to
true
thecaptionGradientView
will be visible. This property supports being set via aUIAppearance
proxy.Declaration
Swift
@objc open dynamic var showsGradientBehindCaptionTextLabel: Bool { get set }
-
An activity indicator that is close to the center of the cell.
Declaration
Swift
public let activityIndicator: UIActivityIndicatorView
-
The color of the cell’s content (i.e. the
iconImageView
andcaptionTextLabel
). While the cell is not selected this color will be slightly dimmed by lowering the alpha value, when the cell is selected the value will be displayed with an alpha value of1
. This property supports being set via aUIAppearance
proxy.Declaration
Swift
@objc open dynamic var contentTintColor: UIColor { get set }
-
The color that the
backgroundImageView
is dimmed with ifdimBackgroundImageWhenSelected
istrue
. This property suppports being set via aUIAppearance
proxy.Declaration
Swift
@objc open dynamic var backgroundDimmingColor: UIColor { get set }
-
When set to
false
thecaptionTextLabel
won’t be shown. This property supports being set via aUIAppearance
proxy.Declaration
Swift
@objc open dynamic var showsCaptionTextLabel: Bool { get set }
-
The border width of the selection indicator. This property suppports being set via a
UIAppearance
proxy.Declaration
Swift
@objc open dynamic var selectionBorderWidth: CGFloat { get set }
-
The corner radius of the
contentView
. This property suppports being set via aUIAppearance
proxy.Declaration
Swift
@objc open dynamic var cornerRadius: CGFloat { get set }