Commit 73dc79a7392ccf3d3b2765f40b92c9784cc58ce8

Authored by 张旭
1 parent a4f6f9ad

单大图cell复用问题 , tabbar图片设置为original

metaCode/Classes/Common/Base/CNLiveBaseTabBarViewController.swift
... ... @@ -39,7 +39,7 @@ class CNLiveBaseTabBarViewController: UITabBarController
39 39 // override func viewWillAppear(_ animated: Bool) {
40 40 // super.viewWillAppear(animated)
41 41 //
42   -// self.selectedIndex = 1
  42 +// self.selectedIndex = 0
43 43 //
44 44 // }
45 45 override func viewDidAppear(_ animated: Bool) {
... ... @@ -63,17 +63,15 @@ class CNLiveBaseTabBarViewController: UITabBarController
63 63 let mineVC = CNLiveMineViewController()
64 64  
65 65 creatTabbarView(viewController: homeVC, image: "tabbar_hoem_icon_default", selectImage: "tabbar_hoem_icon_selected", title: "首页")
66   -
67 66 creatTabbarView(viewController: authVC, image: "tabbar_authentication_unSelect", selectImage: "tabbar_authentication", title: "认证")
68   -
69 67 creatTabbarView(viewController: mineVC, image: "tabbar_mine_icon_default", selectImage: "tabbar_mine_icon_selected", title: "我的")
70 68  
71 69 self.tabBar.tintColor = UIColor("#0066FE")
72 70 self.tabBar.isTranslucent = false
73 71  
74   - self.viewControllers = [
75   - CNLiveBaseNavigationController(rootViewController: homeVC),CNLiveBaseNavigationController(rootViewController: authVC),
76   - CNLiveBaseNavigationController(rootViewController: mineVC)]
  72 + self.viewControllers = [CNLiveBaseNavigationController(rootViewController: homeVC),CNLiveBaseNavigationController(rootViewController: authVC),CNLiveBaseNavigationController(rootViewController: mineVC)]
  73 +
  74 + self.selectedIndex = 0
77 75 }
78 76  
79 77 // MARK: - Tabar 背景图
... ...
metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNDownSlideSingleCourseCell.swift
... ... @@ -79,6 +79,16 @@ class CNDownSlideSingleCourseCell: UITableViewCell {
79 79 }
80 80  
81 81 func setupNewUI(model:CNLiveDownSlideModel){
  82 + contentView.subviews.forEach { view in
  83 + view.removeFromSuperview()
  84 + }
  85 + bgBackView.subviews.forEach { view in
  86 + view.removeFromSuperview()
  87 + }
  88 + bgImageView.subviews.forEach { view in
  89 + view.removeFromSuperview()
  90 + }
  91 +
82 92 if model.type == SlideModelTypeAllCourse12 {
83 93 //全部课程列表
84 94 contentView.addSubview(bgBackView)
... ...
metaCode/Classes/Main/HomePages/Controller/AuthController/CNLiveAuthViewController.swift
... ... @@ -135,8 +135,6 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa
135 135 if slideModel.type == SlideModelTypeRecommend4{
136 136 guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveDownSlideRecommendCellIdentifier) as? CNLiveDownSlideRecommendCell
137 137 else {
138   - // let cell = CNLiveDownSlideRecommendCell()
139   - // cell.slideModel = slideModel
140 138 return CNLiveDownSlideRecommendCell()
141 139 }
142 140 cell.slideModel = slideModel
... ... @@ -145,7 +143,6 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa
145 143 guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveDownSlideTodayRecommendCellIdentifier) as? CNLiveDownSlideTodayRecommendCell
146 144 else {
147 145 let cell = CNLiveDownSlideTodayRecommendCell()
148   - cell.slideModel = slideModel
149 146 return cell
150 147 }
151 148 cell.slideModel = slideModel
... ... @@ -154,7 +151,6 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa
154 151 guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveDownSlideAllCourseCellIdentifier) as? CNDownSlideSingleCourseCell
155 152 else {
156 153 let cell = CNDownSlideSingleCourseCell()
157   - cell.slideModel = slideModel
158 154 return cell
159 155 }
160 156 cell.slideModel = slideModel
... ... @@ -163,7 +159,6 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa
163 159 guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveDownSlideSingleCourseCellIdentifier) as? CNDownSlideSingleCourseCell
164 160 else {
165 161 let cell = CNDownSlideSingleCourseCell()
166   - cell.slideModel = slideModel
167 162 return cell
168 163 }
169 164 cell.slideModel = slideModel
... ...
metaCode/Classes/Main/HomePages/View/HomePage/CNLiveHomePageDuanJuCell.swift
... ... @@ -12,7 +12,6 @@ typealias DuanJUCellSelectedCallBackBlock = (_ cell: CNLiveHomePageDuanJuCell) -
12 12  
13 13 class CNLiveHomePageDuanJuCell:UITableViewCell,UITableViewDelegate,UITableViewDataSource{
14 14 let kCNLiveAlbumCellIdentifier = "kCNLiveAlbumCellIdentifier"
15   -// let bgBackView = UIView()
16 15  
17 16 var DuanJUCellSelectedCallBack:DuanJUCellSelectedCallBackBlock?
18 17 lazy var modelArr: NSMutableArray = {
... ...
metaCode/Supporting Files/Assets.xcassets/TabBar/tabbar_authentication.imageset/Contents.json
... ... @@ -18,5 +18,8 @@
18 18 "info" : {
19 19 "author" : "xcode",
20 20 "version" : 1
  21 + },
  22 + "properties" : {
  23 + "template-rendering-intent" : "original"
21 24 }
22 25 }
... ...
metaCode/Supporting Files/Assets.xcassets/TabBar/tabbar_authentication_unSelect.imageset/Contents.json
... ... @@ -18,5 +18,8 @@
18 18 "info" : {
19 19 "author" : "xcode",
20 20 "version" : 1
  21 + },
  22 + "properties" : {
  23 + "template-rendering-intent" : "original"
21 24 }
22 25 }
... ...
metaCode/Supporting Files/Assets.xcassets/TabBar/tabbar_hoem_icon_default.imageset/Contents.json
... ... @@ -18,5 +18,8 @@
18 18 "info" : {
19 19 "author" : "xcode",
20 20 "version" : 1
  21 + },
  22 + "properties" : {
  23 + "template-rendering-intent" : "original"
21 24 }
22 25 }
... ...
metaCode/Supporting Files/Assets.xcassets/TabBar/tabbar_hoem_icon_selected.imageset/Contents.json
... ... @@ -18,5 +18,8 @@
18 18 "info" : {
19 19 "author" : "xcode",
20 20 "version" : 1
  21 + },
  22 + "properties" : {
  23 + "template-rendering-intent" : "original"
21 24 }
22 25 }
... ...
metaCode/Supporting Files/Assets.xcassets/TabBar/tabbar_mine_icon_default.imageset/Contents.json
... ... @@ -18,5 +18,8 @@
18 18 "info" : {
19 19 "author" : "xcode",
20 20 "version" : 1
  21 + },
  22 + "properties" : {
  23 + "template-rendering-intent" : "original"
21 24 }
22 25 }
... ...
metaCode/Supporting Files/Assets.xcassets/TabBar/tabbar_mine_icon_selected.imageset/Contents.json
... ... @@ -18,5 +18,8 @@
18 18 "info" : {
19 19 "author" : "xcode",
20 20 "version" : 1
  21 + },
  22 + "properties" : {
  23 + "template-rendering-intent" : "original"
21 24 }
22 25 }
... ...