我是tvOS开发的新手,我想创建一个每行4个项目的网格。集合应该垂直滚动。我的挑战是,我不确定如何处理这篇文档中由苹果here提供的信息,因为没有示例。 在iOS中,我们将使用类似如下的内容: class GridFlowLayout: UICollectionViewFlowLayout {
// here you can define the height of each cell
let itemHeight: CGFloat = 160
override init() {
super.init()
setup