| | |
| | | collectionView.backgroundColor = UIColor(hexString: "#F6F6F6") |
| | | collectionView.register(UINib(nibName: "EmptyCCell", bundle: nil), forCellWithReuseIdentifier: "_EmptyCCell") |
| | | collectionView.register(UINib(nibName: "HomeRelaxBanner_2_1_CCell", bundle: nil), forCellWithReuseIdentifier: "_HomeRelaxBanner_2_1_CCell") |
| | | collectionView.contentInset = UIEdgeInsets(top: 0, left: 18, bottom: 0, right: 18) |
| | | collectionView.contentInset = UIEdgeInsets(top: 0, left: 18, bottom: 20, right: 18) |
| | | collectionView.register(StudyListHeaderView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: "header") |
| | | } |
| | | |
| | |
| | | extension StudyListVC:UICollectionViewDelegate & UICollectionViewDataSource{ |
| | | |
| | | func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { |
| | | |
| | | |
| | | |
| | | var modelId:Int? |
| | | if indexPath.section == 0{ |
| | | guard datas?.courseList.count != 0 else{return} |
| | |
| | | |
| | | private func setUI(){ |
| | | backgroundColor = UIColor(hexString: "#F6F6F6") |
| | | lineLabel.font = .systemFont(ofSize: 15, weight: .medium) |
| | | lineLabel.font = .systemFont(ofSize: 15, weight: .bold) |
| | | lineLabel.textColor = UIColor(hexString: "#282828") |
| | | addSubview(lineLabel) |
| | | lineLabel.snp.makeConstraints { make in |
| | | make.left.equalTo(0) |
| | | make.left.equalTo(5) |
| | | make.centerY.equalToSuperview() |
| | | make.width.equalTo(71) |
| | | make.height.equalTo(20) |