wallpaperAI/wallpaper_BProject/Home/C/JX/NW_JXThreeVC.swift
2024-09-03 09:42:18 +08:00

51 lines
1.6 KiB
Swift

//
// 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
}
}