//
|
// CourseDetailApplyVC.swift
|
// WanPai
|
//
|
// Created by 杨锴 on 2023/6/9.
|
//
|
|
import UIKit
|
import JQTools
|
import QMUIKit
|
|
class CourseDetailApplyVC: BaseVC {
|
|
@IBOutlet weak var collectionView: UICollectionView!
|
@IBOutlet weak var cons_collectHei: NSLayoutConstraint!
|
@IBOutlet weak var btn_addStudent: QMUIButton!
|
@IBOutlet weak var tableView: UITableView!
|
@IBOutlet weak var cons_tableHei: NSLayoutConstraint!
|
|
@IBOutlet weak var studentTableView: UITableView!
|
var CellW:Double!
|
var CellH:Double!
|
|
override func viewDidLoad() {
|
super.viewDidLoad()
|
title = "课程详情"
|
}
|
|
override func setUI() {
|
|
CellW = (JQ_ScreenW - 155) / 3.0
|
CellH = CellW * 0.439
|
|
cons_tableHei.constant = 76
|
|
collectionView.delegate = self
|
collectionView.dataSource = self
|
collectionView.register(UINib(nibName: "Common_1_CCell", bundle: nil), forCellWithReuseIdentifier: "_Common_1_CCell")
|
|
studentTableView.dataSource = self
|
studentTableView.register(UINib(nibName: "StudentInfoTCell", bundle: nil), forCellReuseIdentifier: "_StudentInfoTCell")
|
|
btn_addStudent.imagePosition = .right
|
btn_addStudent.spacingBetweenImageAndTitle = 3
|
}
|
}
|
|
extension CourseDetailApplyVC:UICollectionViewDelegate{
|
|
}
|
|
extension CourseDetailApplyVC:UICollectionViewDataSource{
|
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_Common_1_CCell", for: indexPath) as! Common_1_CCell
|
|
return cell
|
}
|
|
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
return 3
|
}
|
}
|
|
extension CourseDetailApplyVC:UICollectionViewDelegateFlowLayout{
|
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
|
return 21
|
}
|
|
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
|
return 21
|
}
|
|
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
|
return CGSize(width: CellW, height: CellH)
|
}
|
}
|
|
extension CourseDetailApplyVC:UITableViewDataSource{
|
|
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
return 1
|
}
|
|
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
let cell = tableView.dequeueReusableCell(withIdentifier: "_StudentInfoTCell") as! StudentInfoTCell
|
|
return cell
|
}
|
|
}
|