Commit 0be60469 authored by David黄金龙's avatar David黄金龙

Merge branch 'develop'

* develop:
  默认index
  侧滑返回
  处理资讯详情 的title
parents 8e769a0b f9a8b0dc
......@@ -209,7 +209,6 @@
045EEF232B9F171A0022A143 /* YHItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEE762B9F171A0022A143 /* YHItemView.swift */; };
045EEF242B9F171A0022A143 /* YHStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEE772B9F171A0022A143 /* YHStepView.swift */; };
045EEF252B9F171A0022A143 /* YHMainInformationCardTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEE782B9F171A0022A143 /* YHMainInformationCardTableViewCell.swift */; };
04684A7F2BD6520A007D95B8 /* UIScrollView+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04684A7E2BD6520A007D95B8 /* UIScrollView+Extension.swift */; };
0468D4202B49320900CFB916 /* YHVerificationCodeLoginController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D41F2B49320900CFB916 /* YHVerificationCodeLoginController.swift */; };
0468D4222B493A5E00CFB916 /* YHPhoneMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4212B493A5E00CFB916 /* YHPhoneMessageView.swift */; };
0468D4242B494BEA00CFB916 /* YHCodeResultViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4232B494BEA00CFB916 /* YHCodeResultViewController.swift */; };
......@@ -660,7 +659,6 @@
045EEE762B9F171A0022A143 /* YHItemView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHItemView.swift; sourceTree = "<group>"; };
045EEE772B9F171A0022A143 /* YHStepView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHStepView.swift; sourceTree = "<group>"; };
045EEE782B9F171A0022A143 /* YHMainInformationCardTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHMainInformationCardTableViewCell.swift; sourceTree = "<group>"; };
04684A7E2BD6520A007D95B8 /* UIScrollView+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIScrollView+Extension.swift"; sourceTree = "<group>"; };
0468D41F2B49320900CFB916 /* YHVerificationCodeLoginController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVerificationCodeLoginController.swift; sourceTree = "<group>"; };
0468D4212B493A5E00CFB916 /* YHPhoneMessageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPhoneMessageView.swift; sourceTree = "<group>"; };
0468D4232B494BEA00CFB916 /* YHCodeResultViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCodeResultViewController.swift; sourceTree = "<group>"; };
......@@ -2113,7 +2111,6 @@
A5ACE9032B4564F7002C94D2 /* UILable+Extension.swift */,
A5ACE9042B4564F7002C94D2 /* Array+Extension.swift */,
04754A942B96FF3D00F8ADCA /* UITextField+Extension.swift */,
04684A7E2BD6520A007D95B8 /* UIScrollView+Extension.swift */,
);
path = Extention;
sourceTree = "<group>";
......@@ -2524,7 +2521,6 @@
045EEEFF2B9F171A0022A143 /* YHSaveAndSubmitView.swift in Sources */,
045EEF0E2B9F171A0022A143 /* YHBasicInfoFillView.swift in Sources */,
045EEEA12B9F171A0022A143 /* YHWorkExperienceDetailModel.swift in Sources */,
04684A7F2BD6520A007D95B8 /* UIScrollView+Extension.swift in Sources */,
A5573ED22B317BFF00D98EC0 /* AppDelegate.swift in Sources */,
A567E5A12BD7643D00D5D5A0 /* YHHKEventViewController.swift in Sources */,
A5ACE9542B4564F7002C94D2 /* YHNavigationController.swift in Sources */,
......
......@@ -45,6 +45,11 @@ class YHBaseViewController: UIViewController {
#endif
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
self.navigationController?.interactivePopGestureRecognizer?.isEnabled = true
}
func popGestureClose() {
if let ges = self.navigationController?.interactivePopGestureRecognizer?.view?.gestureRecognizers {
for item in ges {
......
......@@ -10,13 +10,7 @@ import UIKit
class YHNavigationController: UINavigationController {
override func viewDidLoad() {
super.viewDidLoad()
guard let targets = interactivePopGestureRecognizer?.value(forKey: "_targets") as? [NSObject] else {return}
let targetObjc = targets[0]
let target = targetObjc.value(forKey: "target")
let action = Selector(("handleNavigationTransition:"))
let panges = UIPanGestureRecognizer(target: target, action: action)
view.addGestureRecognizer(panges)
self.interactivePopGestureRecognizer?.delegate = self
}
override func pushViewController(_ viewController: UIViewController, animated: Bool) {
......@@ -27,3 +21,23 @@ class YHNavigationController: UINavigationController {
super.pushViewController(viewController, animated: animated)
}
}
extension YHNavigationController: UIGestureRecognizerDelegate {
func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
if self.viewControllers.count <= 1 {
return false
}
return true
}
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool {
if touch.view == gestureRecognizer.view {
return true
}
return false
}
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
return false
}
}
......@@ -172,6 +172,12 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
} else {
bottomViewForSavePic.isHidden = true
}
if id > 0 {
//资讯详情 不展示title
gk_navTitle = ""
}
getData()
}
......@@ -200,11 +206,9 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
// MARK: - WKNavigationDelegate
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
if vcTitle == nil {
gk_navTitle = webview.title
}
// if vcTitle == nil {
// gk_navTitle = webview.title
// }
}
// MARK: - WKUIDelegate
......
......@@ -106,6 +106,8 @@ class YHPreviewControllerHoldViewController: UIViewController {
indicator.verticalOffset = 4
indicator.indicatorColor = UIColor.brandMainColor
segmentedView.indicators = [indicator]
segmentedView.defaultSelectedIndex = self.myDefaultNavItemIndex
}
override func viewWillAppear(_ animated: Bool) {
......
//
// YHViewController.swift
// galaxy
//
// Created by EDY on 2024/4/22.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
extension UIScrollView {
// 解决有UIScrollView时不能在屏幕左边侧滑返回
open override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
// 过滤UITextView(因为UITextView继承自UIScrollView),否则会引起崩溃
if (gestureRecognizer.view?.isMember(of: UITextView.self))! {
return true
}
let velocity = (gestureRecognizer as! UIPanGestureRecognizer).velocity(in: self)
let location = gestureRecognizer.location(in: self)
if (velocity.x > 0.0 && Int(location.x) % Int(UIScreen.main.bounds.size.width) < 60) {
return false
}
return true
}
}
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