Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mobile-group
galaxy-iOS
Commits
c2492cad
Commit
c2492cad
authored
Apr 23, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
侧滑返回
parent
1f8a0cf7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
37 deletions
+26
-37
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+0
-4
YHBaseViewController.swift
galaxy/galaxy/Classes/Base/C/YHBaseViewController.swift
+5
-0
YHNavigationController.swift
galaxy/galaxy/Classes/Base/C/YHNavigationController.swift
+21
-7
UIScrollView+Extension.swift
...laxy/Classes/Tools/Extention/UIScrollView+Extension.swift
+0
-26
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
c2492cad
...
...
@@ -220,7 +220,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 */
;
};
...
...
@@ -671,7 +670,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>"
;
};
...
...
@@ -2035,7 +2033,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 @@
A5173D682BC399B9007D4E74
/* YHHomePageViewController.swift in Sources */
,
045EEF0E2B9F171A0022A143
/* YHBasicInfoFillView.swift in Sources */
,
045EEEA12B9F171A0022A143
/* YHWorkExperienceDetailModel.swift in Sources */
,
04684A7F2BD6520A007D95B8
/* UIScrollView+Extension.swift in Sources */
,
A5573ED22B317BFF00D98EC0
/* AppDelegate.swift in Sources */
,
A5ACE9542B4564F7002C94D2
/* YHNavigationController.swift in Sources */
,
045EEF252B9F171A0022A143
/* YHMainInformationCardTableViewCell.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Base/C/YHBaseViewController.swift
View file @
c2492cad
...
...
@@ -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
{
...
...
galaxy/galaxy/Classes/Base/C/YHNavigationController.swift
View file @
c2492cad
...
...
@@ -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
}
}
galaxy/galaxy/Classes/Tools/Extention/UIScrollView+Extension.swift
deleted
100644 → 0
View file @
1f8a0cf7
//
// 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
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment