46 lines
1.2 KiB
Swift
46 lines
1.2 KiB
Swift
//
|
|
// NW_CommunityVC.swift
|
|
// wallpaper_BProject
|
|
//
|
|
// Created by 忆海16 on 2024/8/28.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
class NW_CommunityVC: NW_RootVC {
|
|
@IBOutlet weak var tableView: UITableView!
|
|
|
|
override func viewDidLoad() {
|
|
super.viewDidLoad()
|
|
settableView()
|
|
|
|
}
|
|
// MARK: - tableView设置
|
|
func settableView(){
|
|
tableView.delegate = self
|
|
tableView.dataSource = self
|
|
tableView.showsVerticalScrollIndicator = false
|
|
tableView.showsHorizontalScrollIndicator = false
|
|
|
|
tableView.register(UINib(nibName: "NW_CommunityCell", bundle: nil), forCellReuseIdentifier: "NW_CommunityCell")
|
|
}
|
|
}
|
|
// MARK: - tableView代理
|
|
extension NW_CommunityVC:UITableViewDelegate,UITableViewDataSource{
|
|
|
|
|
|
func numberOfSections(in tableView: UITableView) -> Int {
|
|
1
|
|
}
|
|
|
|
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
|
return 10
|
|
}
|
|
|
|
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
|
let cell = tableView.dequeueReusableCell(withIdentifier: "NW_CommunityCell", for: indexPath)as!NW_CommunityCell
|
|
return cell
|
|
}
|
|
|
|
}
|