FavoriteCell
final class FavoriteCell : UICollectionViewCell, ReusableView, NibLoadableView
Specialization of UICollectionViewCell
that knows how to render Favorite attributes.
-
The background color of an inactive favorite cell
Declaration
Swift
let normalBackgroundColor: UIColor
-
Foreground color of an inactive favorite cell
Declaration
Swift
var normalForegroundColor: UIColor
-
Background color of the active favorite cell
Declaration
Swift
var activeBackgroundColor: UIColor
-
Foreground color of the active favorite cell
Declaration
Swift
var activeForegroundColor: UIColor
-
Undocumented
Declaration
Swift
let normalBorderColor: UIColor
-
Attribute set by the FavoritesViewController to limit the cell’s width
Declaration
Swift
var maxWidth: CGFloat? { get set }
-
Indicates if the cell is currently moving around. Update the border color when it is.
Declaration
Swift
var moving: Bool { get set }
-
The intrinsic size of the cell is its content view with the current label text.
Declaration
Swift
override var intrinsicContentSize: CGSize { get }
-
Undocumented
Declaration
Swift
override func awakeFromNib()
-
Show the Favorite name and
active
indicator.Declaration
Swift
func update(favoriteName: String, isActive: Bool)
Parameters
favoriteName
the name to show
isActive
true if the Favorite’s patch is currently active.
-
Report the layout size for a given target size. Forward request to the content view.
Declaration
Swift
override func systemLayoutSizeFitting(_ targetSize: CGSize) -> CGSize