Commit a7bc477b authored by DavidHuang's avatar DavidHuang

直播居中展示

parent dc468e9b
......@@ -79,11 +79,13 @@ class YHHomeHoldViewPageViewController: YHBaseViewController {
for item in dataSource {
tempTitle.append(item.name)
if item.id == 1 {
//推荐
let vc = homePageVC
vc.configModel = self.viewModel.homeInfoModel
arrItemVCs.append(vc)
}
if item.id == 2 {
//
let vc = YHHomeIdentityViewController()
arrItemVCs.append(vc)
}
......@@ -93,15 +95,18 @@ class YHHomeHoldViewPageViewController: YHBaseViewController {
arrItemVCs.append(vc)
}
if item.id == 4 {
//相关资讯
let vc = YHHomeInformationViewController()
arrItemVCs.append(vc)
}
if item.id == 5 {
//银河甄选
let vc = YHSelectViewController()
vc.hideFlag = true
arrItemVCs.append(vc)
}
if item.id == 6 {
//直播
let vc = YHLifeViewController()
vc.hideFlag = true
arrItemVCs.append(vc)
......@@ -123,7 +128,7 @@ class YHHomeHoldViewPageViewController: YHBaseViewController {
segmentedView.reloadData()
} else {
arrItemVCs.removeAll()
var tempTitle: [String] = ["推荐", "身份", "生活", "咨询攻略"]
let tempTitle: [String] = ["推荐", "身份", "生活", "咨询攻略"]
let dataSource = self.viewModel.homeInfoModel?.tab_list ?? []
for item in 0..<4 {
if item == 0{
......
......@@ -30,7 +30,7 @@ class YHLifeViewController: YHBaseViewController {
let collectinoView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout)
collectinoView.backgroundColor = .white
collectinoView.contentInset = UIEdgeInsets(top: 16, left: 20, bottom: 0, right: 20)
// collectinoView.contentInset = UIEdgeInsets(top: 16, left: 20, bottom: 0, right: 20)
collectinoView.register(YHLookCollectionViewCell.self, forCellWithReuseIdentifier:YHLookCollectionViewCell.cellReuseIdentifier)
collectinoView.delegate = self
collectinoView.dataSource = self
......@@ -189,7 +189,10 @@ extension YHLifeViewController {
view.addSubview(myCollectView)
myCollectView.snp.makeConstraints { make in
make.top.bottom.left.right.equalToSuperview()
make.top.equalToSuperview().offset(10)
make.bottom.equalToSuperview()
make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20)
}
view.addSubview(noDataView)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment