Grid Layout
The grid layout is designed to support a vertical scroll direction. You can set it up like this:
let layout = ShortVideoGridLayout.default
let configuration = ShortVideoConfiguration()
configuration.layout = layout
.
.
.
shortVideoView.configuration = configuration
You have the flexibility to modify the number of columns via the layout configuration:
layout.numberOfColumns = numberOfColums
Various attributes can be customized with the grid layout, including:
- Background color
- Spacing between items
Grid Item
For customization of individual grid items, the LORA Short Video SDK
offers the following attributes:
- Item ratio (width/height)
- Corner radius
- Background color
- Play button (set to
nil
to hide it) - Mute button (set to
nil
to hide it) - Thumbnail scale mode
- Video scale mode