StorytellerClipsRowView

The StorytellerClipsRowView inherits from ClipsListView (see ClipsListView)

Dynamic Scaling

Item tiles will scale dynamically to fit the row view. The base size of the tiles is ratio 2/3 width to height. Width of the tile will adjust to the height constraint set to the row.

Example 1

contentView.addSubview(storytellerClipRow)

storytellerClipsRow.translatesAutoresizingMaskIntoConstraints = false
storytellerClipsRow.topAnchor.constraint(equalTo: contentView.topAnchor).isActive = true
storytellerClipsRow.leftAnchor.constraint(equalTo: contentView.leftAnchor).isActive = true
storytellerClipsRow.rightAnchor.constraint(equalTo: contentView.rightAnchor).isActive = true
storytellerClipsRow.bottomAnchor.constraint(equalTo: contentView.bottomAnchor).isActive = true

let rowHeightConstraint = storytellerClipsRow.heightAnchor.constraint(equalToConstant: 0)
rowHeightConstraint?.isActive = true

rowHeightConstraint.constant = 200

The final item tile size will be 133dp x 200dp.

PREVIOUS
Forward Arrow