DolphinEnglishLearnStudent.xcodeproj/project.pbxproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DolphinEnglishLearnStudent/Base/BaseVC.swift | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DolphinEnglishLearnStudent/Moudle/Home/CCell/SimpleImageCCell.swift | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DolphinEnglishLearnStudent/Moudle/Home/CCell/SimpleImageCCell.xib | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DolphinEnglishLearnStudent/Moudle/Home/Listen/VC/HomeListenFightVC.swift | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DolphinEnglishLearnStudent/Moudle/Home/Listen/VC/HomeListenStory_1_VC.swift | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DolphinEnglishLearnStudent/Moudle/Home/Listen/VC/HomeListenStory_2_VC.swift | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DolphinEnglishLearnStudent/Moudle/Home/Listen/VC/HomeListenSubVC.swift | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
DolphinEnglishLearnStudent.xcodeproj/project.pbxproj
@@ -54,6 +54,10 @@ 130A2C812C07075B008463B2 /* ListenFight_Game_Pocket_CCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 130A2C7F2C07075B008463B2 /* ListenFight_Game_Pocket_CCell.swift */; }; 1316A22E2C05CE5900BE6CAA /* GameBeginTipView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1316A22D2C05CE5900BE6CAA /* GameBeginTipView.swift */; }; 1316A2302C05CE6100BE6CAA /* GameBeginTipView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1316A22F2C05CE6100BE6CAA /* GameBeginTipView.xib */; }; 1319B0272C0818460052F889 /* HomeListenStory_1_VC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1319B0262C0818460052F889 /* HomeListenStory_1_VC.swift */; }; 1319B0292C0818540052F889 /* HomeListenStory_2_VC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1319B0282C0818540052F889 /* HomeListenStory_2_VC.swift */; }; 1319B02C2C081A320052F889 /* SimpleImageCCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1319B02A2C081A320052F889 /* SimpleImageCCell.swift */; }; 1319B02D2C081A320052F889 /* SimpleImageCCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1319B02B2C081A320052F889 /* SimpleImageCCell.xib */; }; 133386382C007E91002EE788 /* HomeListenFight_lesson_2_VC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 133386372C007E91002EE788 /* HomeListenFight_lesson_2_VC.swift */; }; 13397D962C05EA9D003440F9 /* ListenFight_Game_CCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13397D942C05EA9D003440F9 /* ListenFight_Game_CCell.swift */; }; 13397D972C05EA9D003440F9 /* ListenFight_Game_CCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13397D952C05EA9D003440F9 /* ListenFight_Game_CCell.xib */; }; @@ -149,6 +153,10 @@ 130A2C7F2C07075B008463B2 /* ListenFight_Game_Pocket_CCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListenFight_Game_Pocket_CCell.swift; sourceTree = "<group>"; }; 1316A22D2C05CE5900BE6CAA /* GameBeginTipView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameBeginTipView.swift; sourceTree = "<group>"; }; 1316A22F2C05CE6100BE6CAA /* GameBeginTipView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GameBeginTipView.xib; sourceTree = "<group>"; }; 1319B0262C0818460052F889 /* HomeListenStory_1_VC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeListenStory_1_VC.swift; sourceTree = "<group>"; }; 1319B0282C0818540052F889 /* HomeListenStory_2_VC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeListenStory_2_VC.swift; sourceTree = "<group>"; }; 1319B02A2C081A320052F889 /* SimpleImageCCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SimpleImageCCell.swift; sourceTree = "<group>"; }; 1319B02B2C081A320052F889 /* SimpleImageCCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SimpleImageCCell.xib; sourceTree = "<group>"; }; 133386372C007E91002EE788 /* HomeListenFight_lesson_2_VC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeListenFight_lesson_2_VC.swift; sourceTree = "<group>"; }; 13397D942C05EA9D003440F9 /* ListenFight_Game_CCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListenFight_Game_CCell.swift; sourceTree = "<group>"; }; 13397D952C05EA9D003440F9 /* ListenFight_Game_CCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ListenFight_Game_CCell.xib; sourceTree = "<group>"; }; @@ -420,6 +428,8 @@ 13A049FE2C058B1400F1F52E /* HomeListenFight_lesson_5_VC.swift */, 13A04A002C05BFCE00F1F52E /* HomeListenGame_1_VC.swift */, 13A04A022C05BFDC00F1F52E /* HomeListenGame_2_VC.swift */, 1319B0262C0818460052F889 /* HomeListenStory_1_VC.swift */, 1319B0282C0818540052F889 /* HomeListenStory_2_VC.swift */, ); path = VC; sourceTree = "<group>"; @@ -462,6 +472,8 @@ children = ( 13EEB8952BFF1531002996FC /* AwardListCCell.swift */, 13EEB8962BFF1531002996FC /* AwardListCCell.xib */, 1319B02A2C081A320052F889 /* SimpleImageCCell.swift */, 1319B02B2C081A320052F889 /* SimpleImageCCell.xib */, ); path = CCell; sourceTree = "<group>"; @@ -594,6 +606,7 @@ 13A04A072C05C29D00F1F52E /* ChooseLevelView.xib in Resources */, 13EEB8A92BFF354B002996FC /* HomeListen_item_TCell.xib in Resources */, 13CDF4512C05757400E8D4FD /* Lesson_4_AnswerView.xib in Resources */, 1319B02D2C081A320052F889 /* SimpleImageCCell.xib in Resources */, 130278982BFD9FBF00DDCE81 /* GoodsItemTCell.xib in Resources */, 13CDF44C2C056A6900E8D4FD /* ListenFight_lesson_4_CCell.xib in Resources */, 130278962BFD9FBF00DDCE81 /* Home_1_TCell.xib in Resources */, @@ -666,6 +679,7 @@ 13EEB89C2BFF1C35002996FC /* HomeListenMenuVC.swift in Sources */, 13CDF4492C0566E400E8D4FD /* HomeListenFight_lesson_4_VC.swift in Sources */, 13A04A012C05BFCE00F1F52E /* HomeListenGame_1_VC.swift in Sources */, 1319B0292C0818540052F889 /* HomeListenStory_2_VC.swift in Sources */, 138964002BFDF98200AEDCD9 /* StudyVC.swift in Sources */, 13EEB8972BFF1531002996FC /* AwardListCCell.swift in Sources */, 13649E982C002534001B04E2 /* HomeListenFight_lesson_1_VC.swift in Sources */, @@ -684,6 +698,7 @@ 130278892BFD9F2A00DDCE81 /* AddressManageVC.swift in Sources */, 1302785C2BFD985E00DDCE81 /* CommonInputView.swift in Sources */, 13A04A052C05C29300F1F52E /* ChooseLevelView.swift in Sources */, 1319B0272C0818460052F889 /* HomeListenStory_1_VC.swift in Sources */, 130278792BFD9ED600DDCE81 /* ExchangeResultVC.swift in Sources */, 1302788D2BFD9F4200DDCE81 /* CoinRecordHistoryVC.swift in Sources */, 13A049FF2C058B1400F1F52E /* HomeListenFight_lesson_5_VC.swift in Sources */, @@ -691,6 +706,7 @@ 1302782C2BFD957100DDCE81 /* SceneDelegate.swift in Sources */, 1302787D2BFD9ED600DDCE81 /* MarketExchangeVC.swift in Sources */, 1302789A2BFD9FBF00DDCE81 /* AddressManageTCell.swift in Sources */, 1319B02C2C081A320052F889 /* SimpleImageCCell.swift in Sources */, 130278422BFD978900DDCE81 /* Enums.swift in Sources */, 13EEB8912BFED3F3002996FC /* AwardListView.swift in Sources */, 130278412BFD978900DDCE81 /* Config.swift in Sources */, DolphinEnglishLearnStudent/Base/BaseVC.swift
@@ -60,7 +60,7 @@ navigationItem.leftBarButtonItem = UIBarButtonItem(customView: backButton) } if !self.isKind(of: HomeVC.self) && !self.isKind(of: HomeListenSubVC.self) && !self.isKind(of: HomeListenFight_lesson_1_VC.self) && !self.isKind(of: HomeListenFight_lesson_2_VC.self) && !self.isKind(of: HomeListenFight_lesson_3_VC.self) && !self.isKind(of: HomeListenFight_lesson_4_VC.self) && !self.isKind(of: HomeListenFight_lesson_5_VC.self) && !self.isKind(of: HomeListenGame_1_VC.self) && !self.isKind(of: HomeListenGame_2_VC.self){ if !self.isKind(of: HomeVC.self) && !self.isKind(of: HomeListenSubVC.self) && !self.isKind(of: HomeListenFight_lesson_1_VC.self) && !self.isKind(of: HomeListenFight_lesson_2_VC.self) && !self.isKind(of: HomeListenFight_lesson_3_VC.self) && !self.isKind(of: HomeListenFight_lesson_4_VC.self) && !self.isKind(of: HomeListenFight_lesson_5_VC.self) && !self.isKind(of: HomeListenGame_1_VC.self) && !self.isKind(of: HomeListenGame_2_VC.self) && !self.isKind(of: HomeListenStory_1_VC.self) && !self.isKind(of: HomeListenStory_2_VC.self){ let titleV = UIView() titleV.bounds = CGRect(x: 0, y: 0, width: 156, height: 63) titleV.sizeToFit() DolphinEnglishLearnStudent/Moudle/Home/CCell/SimpleImageCCell.swift
New file @@ -0,0 +1,17 @@ // // SimpleImageCCell.swift // DolphinEnglishLearnStudent // // Created by 无故事王国 on 2024/5/30. // import UIKit class SimpleImageCCell: UICollectionViewCell { override func awakeFromNib() { super.awakeFromNib() } } DolphinEnglishLearnStudent/Moudle/Home/CCell/SimpleImageCCell.xib
New file @@ -0,0 +1,36 @@ <?xml version="1.0" encoding="UTF-8"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <device id="ipad10_9rounded" orientation="portrait" layout="fullscreen" appearance="light"/> <dependencies> <deployment identifier="iOS"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="_SimpleImageCCell" id="gTV-IL-0wX" customClass="SimpleImageCCell" customModule="DolphinEnglishLearnStudent" customModuleProvider="target"> <rect key="frame" x="0.0" y="0.0" width="869" height="577"/> <autoresizingMask key="autoresizingMask"/> <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"> <rect key="frame" x="0.0" y="0.0" width="869" height="577"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <subviews> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="D8M-NB-xlj"> <rect key="frame" x="5" y="5" width="859" height="567"/> <color key="backgroundColor" red="0.83137254900000002" green="0.82352941180000006" blue="0.80392156859999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </imageView> </subviews> </view> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraints> <constraint firstItem="D8M-NB-xlj" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="5" id="E5a-gL-Wuj"/> <constraint firstAttribute="trailing" secondItem="D8M-NB-xlj" secondAttribute="trailing" constant="5" id="EBF-3o-Y8U"/> <constraint firstItem="D8M-NB-xlj" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="5" id="YzQ-4e-8M4"/> <constraint firstAttribute="bottom" secondItem="D8M-NB-xlj" secondAttribute="bottom" constant="5" id="vKt-cE-Srd"/> </constraints> <size key="customSize" width="869" height="577"/> <point key="canvasLocation" x="439.39024390243901" y="153.81355932203391"/> </collectionViewCell> </objects> </document> DolphinEnglishLearnStudent/Moudle/Home/Listen/VC/HomeListenFightVC.swift
@@ -19,6 +19,8 @@ case lesson5 //自主学习-音图相配 case game1 //游戏类型-超级听力 case game2 //游戏类型-超级记忆 case story1 //故事类型-自主故事1-看图配音 case story2 //故事类型-自主故事2-框架记忆 } class HomeListenFightViewModel{ @@ -45,6 +47,18 @@ private lazy var btn_forward:UIButton = { let btn = UIButton(type: .custom) btn.setTitle("上一题", for: .normal) btn.titleLabel?.font = .systemFont(ofSize: 14, weight: .medium) btn.setTitleColor(Config.ThemeColor, for: .normal) btn.jq_borderColor = Config.ThemeColor btn.backgroundColor = .white btn.jq_borderWidth = 1 btn.jq_cornerRadius = 4 return btn }() private lazy var btn_next:UIButton = { let btn = UIButton(type: .custom) btn.setTitle("下一题", for: .normal) btn.titleLabel?.font = .systemFont(ofSize: 14, weight: .medium) btn.setTitleColor(Config.ThemeColor, for: .normal) btn.jq_borderColor = Config.ThemeColor @@ -133,7 +147,15 @@ make.width.equalTo(124) } let stackView = UIStackView(arrangedSubviews: [btn_forward,label_pageNum,btn_exit]) var stackView = UIStackView(arrangedSubviews: [btn_forward,label_pageNum,btn_exit]) if viewModel.listenType.value == .story2{ btn_next.snp.makeConstraints { make in make.height.equalTo(40) make.width.equalTo(124) } stackView.insertArrangedSubview(btn_next, at: 2) } stackView.spacing = 22 view.addSubview(stackView) stackView.snp.makeConstraints { make in @@ -141,8 +163,6 @@ make.centerX.equalToSuperview() make.height.equalTo(40) } } override func setRx() { @@ -228,6 +248,15 @@ return vc } if viewModel.listenType.value == .story1{ let vc = HomeListenStory_1_VC() return vc } if viewModel.listenType.value == .story2{ let vc = HomeListenStory_2_VC() return vc } let vc = UIViewController() return vc DolphinEnglishLearnStudent/Moudle/Home/Listen/VC/HomeListenStory_1_VC.swift
New file @@ -0,0 +1,126 @@ // // HomeListenStory_1_VC.swift // DolphinEnglishLearnStudent // // Created by 无故事王国 on 2024/5/30. // import UIKit class HomeListenStory_1_VC: BaseVC { private var viewModel = FightAnswerViewModel() private lazy var stackView:UIStackView = { let stackView = UIStackView() stackView.spacing = 78 stackView.distribution = .equalSpacing return stackView }() private lazy var collectionView:UICollectionView = { let flowLayout = UICollectionViewFlowLayout() let w = (JQ_ScreenW - 235 * 2) flowLayout.itemSize = CGSize(width: w, height: w * 0.6666) flowLayout.minimumInteritemSpacing = 0 flowLayout.scrollDirection = .vertical let collection = UICollectionView(frame: .zero, collectionViewLayout: flowLayout) collection.contentInset = UIEdgeInsets(top: 130, left: 0, bottom: 0, right: 0) collection.register(UINib(nibName: "SimpleImageCCell", bundle: nil), forCellWithReuseIdentifier: "_SimpleImageCCell") return collection }() override func setUI() { super.setUI() viewModel.selectIndex.accept(IndexPath(row: 0, section: 0)) collectionView.delegate = self collectionView.dataSource = self collectionView.showsVerticalScrollIndicator = false collectionView.backgroundColor = .clear collectionView.jq_addShadows(shadowColor: UIColor.black.withAlphaComponent(0.1), corner: 8, radius: 10, offset: CGSize(width: 0, height: 2), opacity: 1) view.addSubview(collectionView) collectionView.snp.makeConstraints { make in make.top.equalTo(self.view.safeAreaLayoutGuide.snp.top).offset(0) make.left.equalTo(164) make.width.equalTo(JQ_ScreenW - 164 * 2) make.bottom.equalToSuperview() } view.addSubview(stackView) stackView.snp.makeConstraints { make in make.top.equalTo(self.view.safeAreaLayoutGuide.snp.top).offset(24) make.centerX.equalToSuperview() make.height.equalTo(52) make.width.greaterThanOrEqualTo(100) } for subV in stackView.arrangedSubviews{ subV.removeFromSuperview() } for index in 0...2{ let handleView = StudyHandleView.jq_loadNibView() handleView.listenType = .lesson2 handleView.btn_choose.tag = 10 + index handleView.chooseClouse {[weak self] btn in var lessionType:Fight_lessonType = .none lessionType = .success switch lessionType { case .success: // handleView.btn_choose.isEnabled = false handleView.btn_choose.isSelected = true handleView.btn_state.setImage(UIImage(named: "icon_success_small"), for: .normal) UIView.animate(withDuration: 0.5) { handleView.btn_state.alpha = 1 } // if let cell = self?.collectionView.dequeueReusableCell(withReuseIdentifier: "_SimpleImageCCell", for: self!.viewModel.selectIndex.value!) as? SimpleImageCCell{ // self?.viewModel.answerType.accept(.success) // } case .fail: handleView.btn_state.setImage(UIImage(named: "icon_waring_small"), for: .normal) UIView.animate(withDuration: 0.5) { handleView.btn_state.alpha = 1 } default: handleView.btn_state.setImage(nil, for: .normal) } } handleView.snp.makeConstraints { make in make.height.equalTo(52) make.width.greaterThanOrEqualTo(159) } stackView.addArrangedSubview(handleView) } } } extension HomeListenStory_1_VC:UICollectionViewDelegate{ } extension HomeListenStory_1_VC:UICollectionViewDelegateFlowLayout{ } extension HomeListenStory_1_VC:UICollectionViewDataSource{ func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_SimpleImageCCell", for: indexPath) as! SimpleImageCCell cell.jq_cornerRadius = 10 return cell } func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return 1 } func numberOfSections(in collectionView: UICollectionView) -> Int { return 1 } } DolphinEnglishLearnStudent/Moudle/Home/Listen/VC/HomeListenStory_2_VC.swift
New file @@ -0,0 +1,118 @@ // // HomeListenStory_2_VC.swift // DolphinEnglishLearnStudent // // Created by 无故事王国 on 2024/5/30. // import UIKit class HomeListenStory_2_VC: BaseVC { private var viewModel = FightAnswerViewModel() private lazy var stackView:UIStackView = { let stackView = UIStackView() stackView.spacing = 78 stackView.distribution = .equalSpacing return stackView }() private lazy var collectionView:UICollectionView = { let flowLayout = UICollectionViewFlowLayout() let w = (JQ_ScreenW - 235 * 2) flowLayout.itemSize = CGSize(width: w, height: w * 0.6666) flowLayout.minimumInteritemSpacing = 0 flowLayout.scrollDirection = .vertical let collection = UICollectionView(frame: .zero, collectionViewLayout: flowLayout) collection.contentInset = UIEdgeInsets(top: 130, left: 0, bottom: 0, right: 0) collection.register(UINib(nibName: "SimpleImageCCell", bundle: nil), forCellWithReuseIdentifier: "_SimpleImageCCell") return collection }() override func setUI() { super.setUI() viewModel.selectIndex.accept(IndexPath(row: 0, section: 0)) collectionView.delegate = self collectionView.dataSource = self collectionView.showsVerticalScrollIndicator = false collectionView.backgroundColor = .clear collectionView.jq_addShadows(shadowColor: UIColor.black.withAlphaComponent(0.1), corner: 8, radius: 10, offset: CGSize(width: 0, height: 2), opacity: 1) view.addSubview(collectionView) collectionView.snp.makeConstraints { make in make.top.equalTo(self.view.safeAreaLayoutGuide.snp.top).offset(0) make.left.equalTo(164) make.width.equalTo(JQ_ScreenW - 164 * 2) make.bottom.equalToSuperview() } view.addSubview(stackView) stackView.snp.makeConstraints { make in make.top.equalTo(self.view.safeAreaLayoutGuide.snp.top).offset(24) make.centerX.equalToSuperview() make.height.equalTo(52) make.width.greaterThanOrEqualTo(100) } for subV in stackView.arrangedSubviews{ subV.removeFromSuperview() } let handleView = StudyHandleView.jq_loadNibView() handleView.listenType = .lesson2 handleView.btn_choose.tag = 10 handleView.chooseClouse {[weak self] btn in var lessionType:Fight_lessonType = .none lessionType = .success switch lessionType { case .success: handleView.btn_choose.isSelected = true handleView.btn_state.setImage(UIImage(named: "icon_success_small"), for: .normal) UIView.animate(withDuration: 0.5) { handleView.btn_state.alpha = 1 } case .fail: handleView.btn_state.setImage(UIImage(named: "icon_waring_small"), for: .normal) UIView.animate(withDuration: 0.5) { handleView.btn_state.alpha = 1 } default: handleView.btn_state.setImage(nil, for: .normal) } } handleView.snp.makeConstraints { make in make.height.equalTo(52) make.width.greaterThanOrEqualTo(159) } stackView.addArrangedSubview(handleView) } } extension HomeListenStory_2_VC:UICollectionViewDelegate{ } extension HomeListenStory_2_VC:UICollectionViewDelegateFlowLayout{ } extension HomeListenStory_2_VC:UICollectionViewDataSource{ func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_SimpleImageCCell", for: indexPath) as! SimpleImageCCell cell.jq_cornerRadius = 10 return cell } func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return 1 } func numberOfSections(in collectionView: UICollectionView) -> Int { return 1 } } DolphinEnglishLearnStudent/Moudle/Home/Listen/VC/HomeListenSubVC.swift
@@ -72,6 +72,12 @@ if indexPath.row == 6{ JQ_currentViewController().jq_push(vc: HomeListenFightVC(listenType: .game2)) } if indexPath.row == 7{ JQ_currentViewController().jq_push(vc: HomeListenFightVC(listenType: .story1)) } if indexPath.row == 8{ JQ_currentViewController().jq_push(vc: HomeListenFightVC(listenType: .story2)) } } } } @@ -81,7 +87,7 @@ if section == 0{ return 1 } return 8 return 9 } func numberOfSections(in tableView: UITableView) -> Int { @@ -98,6 +104,20 @@ }else{ let cell = tableView.dequeueReusableCell(withIdentifier: "_HomeListen_item_TCell", for: indexPath) as! HomeListen_item_TCell cell.label_title.text = "\(indexPath.row + 1)" switch indexPath.row { case 0:cell.label_title.text = "题目类型一" case 1:cell.label_title.text = "题目类型二" case 2:cell.label_title.text = "题目类型三" case 3:cell.label_title.text = "题目类型四" case 4:cell.label_title.text = "题目类型五" case 5:cell.label_title.text = "游戏一" case 6:cell.label_title.text = "游戏二" case 7:cell.label_title.text = "故事一" case 8:cell.label_title.text = "故事二" default:break } return cell } }