// // NW_JXThreeVC.swift // wallpaper_BProject // // Created by 忆海16 on 2024/8/29. // import UIKit import JXSegmentedView class NW_JXThreeVC: NW_RootVC { @IBOutlet weak var collectionView: UICollectionView! override func viewDidLoad() { super.viewDidLoad() setCollectionV() } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(true) self.navigationController?.navigationBar.isHidden = true } //MARK: - 设置collectionView func setCollectionV(){ let layout = WaterfallFlowLayout() layout.numberOfColumns = 2 layout.cellPadding = 10 collectionView.collectionViewLayout = layout // collectionView.delegate = self collectionView.dataSource = self collectionView.register(UINib(nibName: "NW_WallpaperCollectionCell", bundle: nil), forCellWithReuseIdentifier: "NW_WallpaperCollectionCell") } } extension NW_JXThreeVC:JXSegmentedListContainerViewListDelegate{ func listView() -> UIView { return view } } extension NW_JXThreeVC:UICollectionViewDataSource{ func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return 50 } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "NW_WallpaperCollectionCell", for: indexPath) as!NW_WallpaperCollectionCell // cell.backgroundColor = .blue return cell } }