Can´t add items to UICollectionView inside UIView xib

后端 未结 5 1766
说谎
说谎 2021-02-05 09:20

Objective

I wanna place my (BusinessViewTableHeader: UIView) as tableView header:

tableView.tableHeaderView = BusinessViewTableHeader.instanceFromNib() a         


        
5条回答
  •  无人及你
    2021-02-05 09:35

    In Swift 3.0 register nib with following method-

    let nibName = UINib(nibName: "FruitCell", bundle:nil)
    collectionView.register(nibName, forCellWithReuseIdentifier: "CellIdentifier")
    

提交回复
热议问题