//
|
// CourseExerciseSubListVC.swift
|
// WanPai
|
//
|
// Created by 无故事王国 on 2023/6/27.
|
//
|
|
import UIKit
|
import QMUIKit
|
|
class CourseExerciseSubListVC: BaseVC {
|
|
@IBOutlet weak var view_topView: UIView!
|
@IBOutlet weak var btn_assign: QMUIButton!
|
@IBOutlet weak var tableView: UITableView!
|
override func viewDidLoad() {
|
super.viewDidLoad()
|
title = "课后练习"
|
}
|
|
override func setUI() {
|
btn_assign.imagePosition = .right
|
btn_assign.spacingBetweenImageAndTitle = 5
|
|
tableView.register(UINib(nibName: "CourseExerciseTCell", bundle: nil), forCellReuseIdentifier: "_CourseExerciseTCell")
|
tableView.delegate = self
|
tableView.dataSource = self
|
tableView.separatorStyle = .none
|
}
|
|
|
@IBAction func assignAction(_ sender: QMUIButton) {
|
guard !sender.isSelected else {return}
|
sender.isSelected = true
|
CourseSubTypeView.show(inView: self.view, afterView: view_topView, items: ["足球课程","篮球课程","羽毛球课程","网球课程"]) { str in
|
sender.isSelected = false
|
|
} closeClouse: {
|
sender.isSelected = false
|
}
|
}
|
}
|
|
extension CourseExerciseSubListVC:UITableViewDelegate{
|
|
}
|
|
extension CourseExerciseSubListVC:UITableViewDataSource{
|
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
let cell = tableView.dequeueReusableCell(withIdentifier: "_CourseExerciseTCell") as! CourseExerciseTCell
|
return cell
|
}
|
|
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
return 5
|
}
|
}
|