Commit 0a84bba8 authored by Steven杜宇's avatar Steven杜宇

// 人脉匹配

parent edb64f3d
...@@ -13,7 +13,9 @@ class YHActivityViewController: YHBaseViewController { ...@@ -13,7 +13,9 @@ class YHActivityViewController: YHBaseViewController {
// MARK: - 生命周期方法 // MARK: - 生命周期方法
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
self.view.backgroundColor = .clear
gk_navigationBar.isHidden = true
} }
} }
......
...@@ -15,17 +15,23 @@ class YHCommunityViewController: YHBaseViewController { ...@@ -15,17 +15,23 @@ class YHCommunityViewController: YHBaseViewController {
let arrItemTitles = ["人脉","活动"] let arrItemTitles = ["人脉","活动"]
var arrItemVCs : [YHBaseViewController] = [] var arrItemVCs : [YHBaseViewController] = []
var segmentedView : JXSegmentedView = JXSegmentedView(frame: CGRect(x: 0, y: k_Height_safeAreaInsetsTop(), width: KScreenWidth, height: 48))
lazy var segmentedView : JXSegmentedView = {
let view = JXSegmentedView(frame: CGRect(x: 0, y: k_Height_safeAreaInsetsTop(), width: KScreenWidth, height: 48))
view.backgroundColor = .clear
return view
}()
lazy var segmentedDataSource: JXSegmentedBaseDataSource = { lazy var segmentedDataSource: JXSegmentedBaseDataSource = {
let dataSource = JXSegmentedTitleDataSource() let dataSource = JXSegmentedTitleDataSource()
dataSource.isTitleColorGradientEnabled = true dataSource.isTitleColorGradientEnabled = true
dataSource.titles = arrItemTitles dataSource.titles = arrItemTitles
dataSource.titleNormalFont = UIFont.PFSC_M(ofSize: 15) dataSource.titleNormalFont = UIFont.PFSC_M(ofSize: 15)
dataSource.titleNormalColor = .labelTextColor2 dataSource.titleNormalColor = UIColor(hex: 0xFFFFFF, alpha: 0.6)
dataSource.titleSelectedFont = UIFont.PFSC_M(ofSize: 18) dataSource.titleSelectedFont = UIFont.PFSC_M(ofSize: 18)
dataSource.titleSelectedColor = .mainTextColor dataSource.titleSelectedColor = .white
dataSource.isItemSpacingAverageEnabled = false dataSource.isItemSpacingAverageEnabled = false
dataSource.itemWidth = JXSegmentedViewAutomaticDimension dataSource.itemWidth = JXSegmentedViewAutomaticDimension
...@@ -33,20 +39,46 @@ class YHCommunityViewController: YHBaseViewController { ...@@ -33,20 +39,46 @@ class YHCommunityViewController: YHBaseViewController {
return dataSource return dataSource
}() }()
lazy var bgImgV:UIImageView = {
let bg = UIImageView(image: UIImage(named: "people_match_bg"))
return bg
}()
//分类title 所对应的VC //分类title 所对应的VC
lazy var listContainerView: JXSegmentedListContainerView! = { lazy var listContainerView: JXSegmentedListContainerView! = {
return JXSegmentedListContainerView(dataSource: self, type: .scrollView) let view = JXSegmentedListContainerView(dataSource: self, type: .scrollView)
view.backgroundColor = .clear
return view
}()
lazy var friendsBtn:UIButton = {
let btn = UIButton()
btn.setImage(UIImage(named: "people_friends_btn"), for: .normal)
btn.setTitle("好友", for: .normal)
btn.setTitleColor(UIColor.white, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_R(ofSize:15)
btn.addTarget(self, action: #selector(didFriendsBtnClicked), for: .touchUpInside)
return btn
}() }()
@objc func didBackBtnClicked() { @objc func didBackBtnClicked() {
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
} }
@objc func didFriendsBtnClicked() {
let vc = YHMyGoodFriendsVC()
self.navigationController?.pushViewController(vc)
}
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
gk_navBarAlpha = 0 gk_navBarAlpha = 0
gk_navigationBar.isHidden = true gk_navigationBar.isHidden = true
view.backgroundColor = .white
self.view.addSubview(bgImgV)
self.bgImgV.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
for i in 0..<arrItemTitles.count { for i in 0..<arrItemTitles.count {
if i != 0 { if i != 0 {
...@@ -60,7 +92,6 @@ class YHCommunityViewController: YHBaseViewController { ...@@ -60,7 +92,6 @@ class YHCommunityViewController: YHBaseViewController {
//segmentedViewDataSource一定要通过属性强持有!!!!!!!!! //segmentedViewDataSource一定要通过属性强持有!!!!!!!!!
segmentedView.dataSource = segmentedDataSource segmentedView.dataSource = segmentedDataSource
segmentedView.collectionView.backgroundColor = .white
view.addSubview(segmentedView) view.addSubview(segmentedView)
segmentedView.listContainer = listContainerView segmentedView.listContainer = listContainerView
...@@ -74,11 +105,17 @@ class YHCommunityViewController: YHBaseViewController { ...@@ -74,11 +105,17 @@ class YHCommunityViewController: YHBaseViewController {
//配置指示器 //配置指示器
let indicator = JXSegmentedIndicatorLineView() let indicator = JXSegmentedIndicatorLineView()
indicator.indicatorWidth = 16 indicator.indicatorWidth = 16
indicator.indicatorColor = UIColor.brandMainColor indicator.indicatorColor = UIColor.white
segmentedView.indicators = [indicator] segmentedView.indicators = [indicator]
segmentedView.backgroundColor = UIColor(red: 0.95, green: 0.95, blue: 0.95, alpha: 1)
segmentedView.defaultSelectedIndex = defaltIndex segmentedView.defaultSelectedIndex = defaltIndex
self.view.addSubview(friendsBtn)
friendsBtn.snp.makeConstraints { make in
make.width.equalTo(82.0)
make.height.equalTo(48)
make.right.equalToSuperview()
make.top.equalTo(k_Height_safeAreaInsetsTop())
}
} }
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
......
...@@ -14,7 +14,7 @@ class YHMatchPeopleViewController: YHBaseViewController { ...@@ -14,7 +14,7 @@ class YHMatchPeopleViewController: YHBaseViewController {
var matchArr:[String] = ["", "", ""] var matchArr:[String] = ["", "", ""]
lazy var bgImgV:UIImageView = { lazy var bgImgV:UIImageView = {
let bg = UIImageView(image: UIImage(named: "people_match_bg")) let bg = UIImageView(image: UIImage(named: "people_match_result_bg"))
return bg return bg
}() }()
...@@ -33,8 +33,7 @@ class YHMatchPeopleViewController: YHBaseViewController { ...@@ -33,8 +33,7 @@ class YHMatchPeopleViewController: YHBaseViewController {
btn.setTitle("换一换", for: .normal) btn.setTitle("换一换", for: .normal)
btn.setTitleColor(UIColor.white, for: .normal) btn.setTitleColor(UIColor.white, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_M(ofSize:15) btn.titleLabel?.font = UIFont.PFSC_M(ofSize:15)
// btn.titleEdgeInsets = UIEdgeInsets(top: 0, left: -21, bottom: 0, right: 21)
// btn.imageEdgeInsets = UIEdgeInsets(top: 0, left: 45, bottom: 0, right: -45)
return btn return btn
}() }()
...@@ -44,8 +43,6 @@ class YHMatchPeopleViewController: YHBaseViewController { ...@@ -44,8 +43,6 @@ class YHMatchPeopleViewController: YHBaseViewController {
btn.setTitle("我的名片", for: .normal) btn.setTitle("我的名片", for: .normal)
btn.setTitleColor(UIColor.white, for: .normal) btn.setTitleColor(UIColor.white, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_M(ofSize:15) btn.titleLabel?.font = UIFont.PFSC_M(ofSize:15)
// btn.titleEdgeInsets = UIEdgeInsets(top: 0, left: -21, bottom: 0, right: 21)
// btn.imageEdgeInsets = UIEdgeInsets(top: 0, left: 60, bottom: 0, right: -60)
return btn return btn
}() }()
......
...@@ -10,13 +10,67 @@ import UIKit ...@@ -10,13 +10,67 @@ import UIKit
import JXSegmentedView import JXSegmentedView
class YHPeopleViewController: YHBaseViewController { class YHPeopleViewController: YHBaseViewController {
// MARK: - 生命周期方法
lazy var topLabel:UILabel = {
let label = UILabel()
label.textAlignment = .center
label.textColor = UIColor.white
label.font = UIFont.PFSC_R(ofSize:16)
label.text = "为您匹配适合您的优质人脉"
return label
}()
lazy var bottomBtn:UIButton = {
let btn = UIButton()
btn.backgroundColor = .brandMainColor
btn.setTitle("AI人脉雷达匹配", for: .normal)
btn.setTitleColor(.white, for: .normal)
btn.titleLabel?.font = .PFSC_M(ofSize: 15)
btn.layer.cornerRadius = 3.0
return btn
}()
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
self.view.backgroundColor = .brandMainColor gk_navigationBar.isHidden = true
self.view.backgroundColor = .clear
createUI()
}
func createUI() {
let wingLeftImgV = UIImageView(image: UIImage(named: "people_match_wing_left"))
self.view.addSubview(wingLeftImgV)
let wingRightImgV = UIImageView(image: UIImage(named: "people_match_wing_right"))
self.view.addSubview(wingRightImgV)
self.view.addSubview(topLabel)
self.view.addSubview(self.bottomBtn)
self.topLabel.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.top.equalTo(50)
make.height.equalTo(22)
}
self.bottomBtn.snp.makeConstraints { make in
make.left.equalTo(24)
make.right.equalTo(-24)
make.height.equalTo(48.0)
make.bottom.equalTo(-k_Height_safeAreaInsetsBottom()-48-60)
}
let tap = UITapGestureRecognizer(target: self, action: #selector(abc)) wingLeftImgV.snp.makeConstraints { make in
self.view.addGestureRecognizer(tap) make.width.height.equalTo(19)
make.right.equalTo(self.topLabel.snp.left)
make.centerY.equalTo(self.topLabel)
}
wingRightImgV.snp.makeConstraints { make in
make.width.height.equalTo(19)
make.left.equalTo(self.topLabel.snp.right)
make.centerY.equalTo(self.topLabel)
}
} }
@objc func abc() { @objc func abc() {
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 2033194953@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 2033194953@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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