Commit 26cbf048 authored by David黄金龙's avatar David黄金龙

Merge branch 'youhua-dev' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into youhua-dev

* 'youhua-dev' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  // UIbug修复
  邀请有礼 关于银河湾Ui走查修改
parents 879748ad e867fc22
...@@ -54,12 +54,13 @@ class YHHomeIdentityListVC: YHBaseViewController { ...@@ -54,12 +54,13 @@ class YHHomeIdentityListVC: YHBaseViewController {
}() }()
lazy var headerView:UIView = { lazy var headerView:UIView = {
let view = UIView(frame: CGRectMake(0, 0, KScreenWidth, KScreenWidth+44.0+9.0)) let view = UIView(frame: CGRectMake(0, 0, KScreenWidth, 8.0+KScreenWidth+44.0+9.0))
view.clipsToBounds = true view.clipsToBounds = true
view.backgroundColor = .white view.backgroundColor = .white
view.addSubview(self.headImgView) view.addSubview(self.headImgView)
headImgView.snp.makeConstraints { make in headImgView.snp.makeConstraints { make in
make.left.top.right.equalToSuperview() make.top.equalToSuperview().offset(8.0)
make.left.right.equalToSuperview()
make.height.equalTo(headImgView.snp.width) make.height.equalTo(headImgView.snp.width)
} }
self.segmentedView.dataSource = segmentedDataSource self.segmentedView.dataSource = segmentedDataSource
......
...@@ -62,7 +62,7 @@ class YHHomeIdentityViewController: YHBaseViewController { ...@@ -62,7 +62,7 @@ class YHHomeIdentityViewController: YHBaseViewController {
make.height.equalTo(44) make.height.equalTo(44)
} }
self.scrollView.snp.makeConstraints { make in self.scrollView.snp.makeConstraints { make in
make.top.equalTo(self.subTabBar.snp.bottom).offset(8.0) make.top.equalTo(self.subTabBar.snp.bottom)
make.left.right.bottom.equalToSuperview() make.left.right.bottom.equalToSuperview()
} }
} }
......
...@@ -94,7 +94,7 @@ class YHHomeInfoDetailContainerViewController: YHBaseViewController { ...@@ -94,7 +94,7 @@ class YHHomeInfoDetailContainerViewController: YHBaseViewController {
make.height.equalTo(44) make.height.equalTo(44)
} }
self.listContainerView.snp.makeConstraints { make in self.listContainerView.snp.makeConstraints { make in
let gap = isHaveHot ? 44.0+19.0 : 19.0 let gap = isHaveHot ? 44.0+4.0 : 4.0
make.top.equalTo(k_Height_NavigationtBarAndStatuBar+gap) make.top.equalTo(k_Height_NavigationtBarAndStatuBar+gap)
make.left.equalTo(0) make.left.equalTo(0)
make.right.equalTo(0) make.right.equalTo(0)
......
...@@ -47,7 +47,8 @@ extension YHInvatationShareViewController { ...@@ -47,7 +47,8 @@ extension YHInvatationShareViewController {
}() }()
view.addSubview(centerImageView) view.addSubview(centerImageView)
centerImageView.snp.makeConstraints { make in centerImageView.snp.makeConstraints { make in
make.center.equalToSuperview() make.centerX.equalToSuperview()
make.centerY.equalToSuperview().offset(-30)
make.height.equalTo(480) make.height.equalTo(480)
make.width.equalTo(270) make.width.equalTo(270)
} }
......
...@@ -13,7 +13,38 @@ class YHInvitationWithGiftsViewController: YHBaseViewController { ...@@ -13,7 +13,38 @@ class YHInvitationWithGiftsViewController: YHBaseViewController {
var tableView: UITableView! var tableView: UITableView!
var bottomViewForShare: YHInvitationWithGiftsShareBottomView! var bottomViewForShare: YHInvitationWithGiftsShareBottomView!
var viewModel: YHInvitationWithGiftsViewModel = YHInvitationWithGiftsViewModel() var viewModel: YHInvitationWithGiftsViewModel = YHInvitationWithGiftsViewModel()
lazy var navBar: YHCustomNavigationBar = {
let bar = YHCustomNavigationBar.navBar()
bar.backgroundColor = .clear
bar.backButton.setImage(UIImage(named: "back_icon"), for: .normal)
bar.backBlock = {
[weak self] in
guard let self = self else { return }
let view = YHInvitationWithGiftsShareView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
view.block = {[weak self] tag in
if tag == 0 {
self?.navigationController?.popViewController()
} else {
let vc = YHInvatationShareViewController()
self?.navigationController?.pushViewController(vc)
}
}
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
}
return bar
}()
lazy var navView:UIView = {
let view = UIView()
view.backgroundColor = .clear
view.addSubview(self.navBar)
self.navBar.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(k_Height_NavContentBar)
}
return view
}()
lazy var headView : YHInvitationWithGiftsHeadView = { lazy var headView : YHInvitationWithGiftsHeadView = {
let headView = YHInvitationWithGiftsHeadView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 666)) let headView = YHInvitationWithGiftsHeadView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 666))
return headView return headView
...@@ -27,8 +58,13 @@ class YHInvitationWithGiftsViewController: YHBaseViewController { ...@@ -27,8 +58,13 @@ class YHInvitationWithGiftsViewController: YHBaseViewController {
override func backItemClick(_ sender: Any) { override func backItemClick(_ sender: Any) {
let view = YHInvitationWithGiftsShareView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight)) let view = YHInvitationWithGiftsShareView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
view.block = { tag in view.block = {[weak self] tag in
self.navigationController?.popViewController() if tag == 0 {
self?.navigationController?.popViewController()
} else {
let vc = YHInvatationShareViewController()
self?.navigationController?.pushViewController(vc)
}
} }
let window = UIApplication.shared.yhKeyWindow() let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view) window?.addSubview(view)
...@@ -40,8 +76,13 @@ class YHInvitationWithGiftsViewController: YHBaseViewController { ...@@ -40,8 +76,13 @@ class YHInvitationWithGiftsViewController: YHBaseViewController {
/// 是否可以返回,包括点击返回和手势返回,默认YES /// 是否可以返回,包括点击返回和手势返回,默认YES
override func navigationShouldPop() -> Bool { override func navigationShouldPop() -> Bool {
let view = YHInvitationWithGiftsShareView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight)) let view = YHInvitationWithGiftsShareView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
view.block = { tag in view.block = {[weak self] tag in
self.navigationController?.popViewController() if tag == 0 {
self?.navigationController?.popViewController()
} else {
let vc = YHInvatationShareViewController()
self?.navigationController?.pushViewController(vc)
}
} }
let window = UIApplication.shared.yhKeyWindow() let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view) window?.addSubview(view)
...@@ -110,6 +151,7 @@ extension YHInvitationWithGiftsViewController { ...@@ -110,6 +151,7 @@ extension YHInvitationWithGiftsViewController {
} }
func setView() { func setView() {
gk_navigationBar.isHidden = true
view.backgroundColor = .contentBkgColor view.backgroundColor = .contentBkgColor
let rightButtonItem = UIBarButtonItem(title: "规则", style: .plain, target: self, action: #selector(lookDeatil)) let rightButtonItem = UIBarButtonItem(title: "规则", style: .plain, target: self, action: #selector(lookDeatil))
rightButtonItem.setTitleTextAttributes([.foregroundColor: UIColor.mainTextColor], for: .normal) rightButtonItem.setTitleTextAttributes([.foregroundColor: UIColor.mainTextColor], for: .normal)
...@@ -150,6 +192,11 @@ extension YHInvitationWithGiftsViewController { ...@@ -150,6 +192,11 @@ extension YHInvitationWithGiftsViewController {
make.bottom.left.right.equalToSuperview() make.bottom.left.right.equalToSuperview()
make.height.equalTo(98) make.height.equalTo(98)
} }
view.addSubview(self.navView)
self.navView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
make.height.equalTo(k_Height_NavigationtBarAndStatuBar)
}
} }
@objc func lookDeatil() { @objc func lookDeatil() {
...@@ -175,3 +222,24 @@ extension YHInvitationWithGiftsViewController { ...@@ -175,3 +222,24 @@ extension YHInvitationWithGiftsViewController {
} }
} }
} }
extension YHInvitationWithGiftsViewController: UIScrollViewDelegate {
func scrollViewDidScroll(_ scrollView: UIScrollView) {
var percent = scrollView.contentOffset.y/k_Height_NavigationtBarAndStatuBar
if percent < 0.0 {
percent = 0.0
} else if percent > 1.0 {
percent = 1.0
}
navView.backgroundColor = UIColor(hex: 0xFFFFFF, alpha: percent)
if percent >= 0.5 {
navBar.backButton.setImage(UIImage(named: "back_icon"), for: .normal)
navBar.title = "关于银河湾"
} else {
navBar.backButton.setImage(UIImage(named: "back_icon"), for: .normal)
navBar.title = ""
}
}
}
...@@ -93,10 +93,12 @@ class YHInvitationWithGiftsHeadView: UIView { ...@@ -93,10 +93,12 @@ class YHInvitationWithGiftsHeadView: UIView {
bgView = { bgView = {
let view = UIView() let view = UIView()
view.backgroundColor = .white view.backgroundColor = .white.withAlphaComponent(0.68)
view.clipsToBounds = true view.clipsToBounds = true
view.layer.masksToBounds = true view.layer.masksToBounds = true
view.layer.cornerRadius = 15 view.layer.cornerRadius = 15
view.layer.borderWidth = 1
view.layer.borderColor = UIColor.white.cgColor
view.isHidden = true view.isHidden = true
return view return view
}() }()
......
...@@ -47,7 +47,7 @@ class YHInvitationWithGiftsSecondTableViewCell: UITableViewCell { ...@@ -47,7 +47,7 @@ class YHInvitationWithGiftsSecondTableViewCell: UITableViewCell {
if tableData?.list.count == 0 { if tableData?.list.count == 0 {
let label = UILabel(frame: CGRect(x: 0, y: 0, width: self.width - 30, height: 40)) let label = UILabel(frame: CGRect(x: 0, y: 0, width: self.width - 30, height: 40))
label.text = "还未有推荐信息,快分享给好友吧~" label.text = "还未有推荐信息,快分享给好友吧~"
label.textColor = UIColor.mainTextColor30 label.textColor = UIColor.yhGreyColor
label.font = UIFont.PFSC_M(ofSize: 12) label.font = UIFont.PFSC_M(ofSize: 12)
label.textAlignment = .center label.textAlignment = .center
self.tableView.tableFooterView = label self.tableView.tableFooterView = label
...@@ -237,7 +237,7 @@ class YHInvitationWithGiftsSecondTableViewCell: UITableViewCell { ...@@ -237,7 +237,7 @@ class YHInvitationWithGiftsSecondTableViewCell: UITableViewCell {
let view = UILabel() let view = UILabel()
view.text = "*积分发放及提取方式,详见规则" view.text = "*积分发放及提取方式,详见规则"
view.font = UIFont.PFSC_M(ofSize: 11) view.font = UIFont.PFSC_M(ofSize: 11)
view.textColor = UIColor.yhGreyColor view.textColor = UIColor.mainTextColor50
view.textAlignment = .center view.textAlignment = .center
return view return view
}() }()
......
...@@ -98,6 +98,7 @@ class YHInvitationWithGiftsShareView: UIView { ...@@ -98,6 +98,7 @@ class YHInvitationWithGiftsShareView: UIView {
@objc func share() { @objc func share() {
removeFromSuperview() removeFromSuperview()
block?(1)
} }
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "mine_item_appoint@2x.png", "filename" : "wode_xiaoxi@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "mine_item_appoint@3x.png", "filename" : "wode_xiaoxi@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
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