How to replace a table view with a collection view?

-1

I'm trying to replace a table view with a collection view.

I searched the documentation, but found nothing. Here is the prototype version, ie the most current version has UITableViewController by UICollectionViewController, the problem itself is here:

init(CollectionViewLayout: UICollectionViewLayout, itemInfo: IndicatorInfo) {
    super.init()

    self.itemInfo = itemInfo
}

What's driving me crazy is this, what do I put inside the parentheses?

Here is the complete file:

import UIKit
import XLPagerTabStrip

class BooksChildViewController: UITableViewController, IndicatorInfoProvider {

let cellIdentifier = "postCell"
var blackTheme = false
var itemInfo = IndicatorInfo(title: "Livros")

init(style: UITableViewStyle, itemInfo: IndicatorInfo) {
    self.itemInfo = itemInfo
    super.init(style: style)
}

required init?(coder aDecoder: NSCoder) {
    fatalError("init(coder:) has not been implemented")
}

override func viewDidLoad() {
    super.viewDidLoad()

}

override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)

}

// MARK: - IndicatorInfoProvider

func indicatorInfo(for pagerTabStripController: PagerTabStripViewController) -> IndicatorInfo {
    return itemInfo
    }

}
    
asked by anonymous 28.12.2018 / 19:08

0 answers