Commit 2464bb3a 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:
  // UI更新
  //  UI调整
  icon 替换
  //  滑动改变视频播放进度
  UI走查相关内容修改
  香港办事 香港生活UI
  //  位置改变
  默认选择YHOtherPickView
parents ae1b244a 05bafa97
......@@ -27,7 +27,7 @@ class YHServerHKLifeViewController: YHBaseViewController {
let flowLayout = YHHomeCollectionLayout()
flowLayout.minimumInteritemSpacing = 7.0
flowLayout.minimumColumnSpacing = 7.0
flowLayout.sectionInset = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 20)
flowLayout.sectionInset = UIEdgeInsets(top: 8, left: 20, bottom: 0, right: 20)
let collectinoView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout)
collectinoView.backgroundColor = .white
......
......@@ -27,7 +27,7 @@ class YHServiceListViewController: YHBaseViewController {
let flowLayout = YHHomeCollectionLayout()
flowLayout.minimumInteritemSpacing = 7.0
flowLayout.minimumColumnSpacing = 7.0
flowLayout.sectionInset = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 20)
flowLayout.sectionInset = UIEdgeInsets(top: 8, left: 20, bottom: 0, right: 20)
let collectinoView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout)
collectinoView.backgroundColor = .white
......
......@@ -97,9 +97,10 @@ class YHServiceViewController: YHBaseViewController {
view.addSubview(navBar)
navBar.snp.makeConstraints { make in
make.left.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_statusBar())
// make.top.equalToSuperview().offset(k_Height_statusBar())
make.height.equalTo(k_Height_NavContentBar)
make.width.equalTo(47)
make.centerY.equalTo(segmentedView.snp.centerY)
}
segmentedView.defaultSelectedIndex = defaltIndex
......
......@@ -215,7 +215,7 @@ class YHCertificateUploadSheetView: UIView {
tableView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.top.equalTo(topView.snp.bottom).offset(20)
make.top.equalTo(topView.snp.bottom).offset(0)
}
}
......
......@@ -11,6 +11,7 @@ import UIKit
class YHFormItemOnlyDoubleChoiceCell: UITableViewCell {
static let cellReuseIdentifier = "YHFormItemOnlyDoubleChoiceCell"
let horizonalGap = 18.0
let btnWidth = 70.0
let btnHeight = 32.0
let btnTitleSelectColor = UIColor.brandMainColor
......@@ -43,6 +44,12 @@ class YHFormItemOnlyDoubleChoiceCell: UITableViewCell {
}
}
private lazy var topLine:UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
// 更新答案按钮选中状态
func updateAnswerButton(_ btn:UIButton, _ isSelect:Bool) {
btn.layer.borderColor = (isSelect ? btnTitleSelectColor : .clear).cgColor
......@@ -98,11 +105,13 @@ class YHFormItemOnlyDoubleChoiceCell: UITableViewCell {
contentView.addSubview(answer1Btn)
contentView.addSubview(answer2Btn)
contentView.addSubview(topLine)
answer1Btn.snp.makeConstraints { make in
make.top.equalTo(16)
make.bottom.equalTo(-16)
make.size.equalTo(CGSize(width: btnWidth, height: btnHeight))
make.left.equalToSuperview().offset(16)
make.centerY.equalToSuperview()
}
answer2Btn.snp.makeConstraints { make in
......@@ -110,6 +119,13 @@ class YHFormItemOnlyDoubleChoiceCell: UITableViewCell {
make.left.equalTo(answer1Btn.snp.right).offset(10)
make.centerY.equalTo(answer1Btn)
}
topLine.snp.makeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap)
make.height.equalTo(1.0)
make.top.equalToSuperview()
}
}
@objc func didClickResponseBtn(btn: UIButton) {
......
......@@ -467,7 +467,7 @@ class YHItemView: UIView {
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
case .id:
YHOtherPickerView.show(type: .idType) {[weak self] data in
YHOtherPickerView.show(type: .idType, selectTitle: self.dataSource?.message ?? "") {[weak self] data in
guard let self = self else { return }
self.dataSource?.message = data.title
self.dataSource?.value = [data.index]
......@@ -487,7 +487,7 @@ class YHItemView: UIView {
}
UIViewController.current?.navigationController?.pushViewController(vc)
case .sex:
YHOtherPickerView.show(type: .sex) {[weak self] data in
YHOtherPickerView.show(type: .sex, selectTitle: self.dataSource?.message ?? "") {[weak self] data in
guard let self = self else { return }
self.dataSource?.message = data.title
self.dataSource?.value = [data.index]
......@@ -497,7 +497,7 @@ class YHItemView: UIView {
}
}
case .marry:
YHOtherPickerView.show(type: .marry) {[weak self] data in
YHOtherPickerView.show(type: .marry, selectTitle: self.dataSource?.message ?? "") {[weak self] data in
guard let self = self else { return }
self.dataSource?.message = data.title
self.dataSource?.value = [data.index]
......
......@@ -419,7 +419,7 @@ extension YHOtherInfoFillCell {
extension YHOtherInfoFillCell {
@objc func tapViewItem(_ gestureRecognizer: UIPanGestureRecognizer) {
YHOtherPickerView.show(type: .language) { item in
YHOtherPickerView.show(type: .language, selectTitle: self.dataModel?.language_detail?.levelDes ?? "") { item in
self.dataModel?.language_detail?.level = Int(item.index) ?? 0
self.dataModel?.language_detail?.levelDes = item.title
self.languageView.updateKeyName(name: "您的语言水平与下列哪一项符合", keyValue:self.dataModel?.language_detail?.levelDes ?? "")
......@@ -429,7 +429,7 @@ extension YHOtherInfoFillCell {
}
@objc func tapViewItem2(_ gestureRecognizer: UIPanGestureRecognizer) {
YHOtherPickerView.show(type: .professionalSkill) { item in
YHOtherPickerView.show(type: .professionalSkill, selectTitle: self.dataModel?.profession?.optionDes ?? "") { item in
print(item)
self.dataModel?.profession?.option = Int(item.index) ?? 0
self.dataModel?.profession?.optionDes = item.title
......
......@@ -20,6 +20,23 @@ class YHOtherPickerView: UIView {
private var type : YHOtherPickerViewType = .none
var arrData : [YHOtherPickerViewItemData] = []
var selectTitle: String = "" {
didSet {
var selectIndex = 0
for i in 0..<arrData.count {
let model = arrData[i]
if model.title == selectTitle {
selectIndex = i
}
if model.index == selectTitle {
selectIndex = i
}
}
pickerView.selectRow(selectIndex, inComponent: 0, animated: false)
userSelectedItem = arrData[selectIndex]
pickerView.reloadAllComponents()
}
}
private var selectBlock:((YHOtherPickerViewItemData)->Void)? //回调
private var userSelectedItem : YHOtherPickerViewItemData? //用户选择的item
......@@ -134,13 +151,14 @@ class YHOtherPickerView: UIView {
UIApplication.shared.yhKeyWindow()?.addSubview(self)
}
static func show(type:YHOtherPickerViewType, callBack: @escaping ((YHOtherPickerViewItemData)->Void)) {
static func show(type:YHOtherPickerViewType, selectTitle: String = "", callBack: @escaping ((YHOtherPickerViewItemData)->Void)) {
IQKeyboardManager.shared.resignFirstResponder()
let picker = YHOtherPickerView(type: type)
picker.selectBlock = callBack
picker.show()
picker.selectTitle = selectTitle
}
@objc func dismiss() {
......@@ -154,9 +172,6 @@ class YHOtherPickerView: UIView {
whiteContentView.addSubview(topView)
whiteContentView.addSubview(pickerView)
if let title = title {
titleLabel.text = title
} else {
......
......@@ -448,7 +448,7 @@ class YHWorkExperienceItemView: UIView {
}
UIViewController.current?.navigationController?.pushViewController(vc)
case .nature:
YHOtherPickerView.show(type: .nature) {[weak self] data in
YHOtherPickerView.show(type: .nature, selectTitle: self.dataSource?.message ?? "") {[weak self] data in
guard let self = self else { return }
self.dataSource?.message = data.title
self.updateAllViews()
......@@ -457,7 +457,7 @@ class YHWorkExperienceItemView: UIView {
}
}
case .certificate:
YHOtherPickerView.show(type: .certificate) {[weak self] data in
YHOtherPickerView.show(type: .certificate, selectTitle: self.dataSource?.message ?? "") {[weak self] data in
guard let self = self else { return }
self.dataSource?.message = data.title
self.updateAllViews()
......@@ -466,7 +466,7 @@ class YHWorkExperienceItemView: UIView {
}
}
case .structure:
YHOtherPickerView.show(type: .structure) {[weak self] data in
YHOtherPickerView.show(type: .structure, selectTitle: self.dataSource?.message ?? "") {[weak self] data in
guard let self = self else { return }
self.dataSource?.message = data.title
self.dataSource?.value = [data.index]
......@@ -476,7 +476,7 @@ class YHWorkExperienceItemView: UIView {
}
}
case .level:
YHOtherPickerView.show(type: .level) {[weak self] data in
YHOtherPickerView.show(type: .level, selectTitle: self.dataSource?.message ?? "") {[weak self] data in
guard let self = self else { return }
self.dataSource?.message = data.title
self.dataSource?.value = [data.index]
......@@ -486,7 +486,7 @@ class YHWorkExperienceItemView: UIView {
}
}
case .prove:
YHOtherPickerView.show(type: .prove) {[weak self] data in
YHOtherPickerView.show(type: .prove, selectTitle: self.dataSource?.message ?? "") {[weak self] data in
guard let self = self else { return }
self.dataSource?.message = data.title
self.updateAllViews()
......
......@@ -62,7 +62,7 @@ class YHWorkFileItemView: UIView {
}()
addSubview(deleteButton)
deleteButton.snp.makeConstraints { make in
make.right.equalTo(-24)
make.right.equalToSuperview()
make.height.equalTo(20)
make.width.equalTo(28)
make.centerY.equalTo(titleLabel.snp.centerY)
......
......@@ -39,7 +39,7 @@ class YHServiceSectionView: UIView {
let collectinoView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout)
collectinoView.backgroundColor = .white
collectinoView.contentInset = UIEdgeInsets(top: 8, left: 20, bottom: 0, right: 20)
collectinoView.contentInset = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 20)
collectinoView.register(YHServiceSectionCollectionViewCell.self, forCellWithReuseIdentifier:YHServiceSectionCollectionViewCell.cellReuseIdentifier)
collectinoView.delegate = self
collectinoView.dataSource = self
......
......@@ -51,8 +51,8 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget
return [PersonalModuleItem(title: "通知设置".local, type:.notifySettings),
PersonalModuleItem(title: "权限配置".local, type:.permissionSettings),
PersonalModuleItem(title: "关于我们".local, type:.aboutUs),
PersonalModuleItem(title: "用户条款".local, type:.userItems),
PersonalModuleItem(title: "隐私协议".local, type:.privaceAgreement),
PersonalModuleItem(title: "用户条款".local, type:.userItems),
PersonalModuleItem(title: "设备相关".local, type:.deviceInfo),
PersonalModuleItem(title: "版本 \(UIDevice.appVersion())", isShowRedPoint:isShowVersionRedPoint, type:.version), ]
......@@ -60,16 +60,16 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget
return [PersonalModuleItem(title: "通知设置".local, type:.notifySettings),
PersonalModuleItem(title: "权限配置".local, type:.permissionSettings),
PersonalModuleItem(title: "关于我们".local, type:.aboutUs),
PersonalModuleItem(title: "用户条款".local, type:.userItems),
PersonalModuleItem(title: "隐私协议".local, type:.privaceAgreement),
PersonalModuleItem(title: "用户条款".local, type:.userItems),
PersonalModuleItem(title: "设备相关".local, type:.deviceInfo),
PersonalModuleItem(title: "版本 \(UIDevice.appVersion())",isShowRedPoint:isShowVersionRedPoint, type:.version)]
#else
return [PersonalModuleItem(title: "通知设置".local, type:.notifySettings),
PersonalModuleItem(title: "权限配置".local, type:.permissionSettings),
PersonalModuleItem(title: "关于我们".local, type:.aboutUs),
PersonalModuleItem(title: "用户条款".local, type:.userItems),
PersonalModuleItem(title: "隐私协议".local, type:.privaceAgreement),
PersonalModuleItem(title: "用户条款".local, type:.userItems),
PersonalModuleItem(title: "版本 \(UIDevice.appVersion())",isShowRedPoint:isShowVersionRedPoint, type:.version)]
#endif
......
......@@ -49,8 +49,7 @@ class YHVideoPlayerVC: YHBaseViewController {
// enable setting the volume by touch gesture in the player
BMPlayerConf.enableVolumeGestures = false
// enable setting the playtime by touch gesture in the player
BMPlayerConf.enablePlaytimeGestures = false
BMPlayerConf.enablePlaytimeGestures = true
let player = BMPlayer(customControlView: videoControlView)
return player
}()
......@@ -96,6 +95,7 @@ class YHVideoPlayerVC: YHBaseViewController {
NotificationCenter.default.addObserver(self, selector: #selector(loginSuccess), name: YhConstant.YhNotification.didLoginSuccessNotifiction, object: nil)
gk_navigationBar.isHidden = true
self.navigationController?.interactivePopGestureRecognizer?.isEnabled = false
view.backgroundColor = .black
view.addSubview(navBar)
setupLikeAndCollectUI()
......
......@@ -5,12 +5,11 @@
"scale" : "1x"
},
{
"filename" : "Group 2505@2x.png",
"filename" : "xinxi_Completed.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 2505@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
......@@ -5,12 +5,11 @@
"scale" : "1x"
},
{
"filename" : "Ellipse 18@2x.png",
"filename" : "xinxi_in progress.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Ellipse 18@3x.png",
"idiom" : "universal",
"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