Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ios
/
YH_Explorer
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
孟顺
6 years ago
Commit
4c1f6da0b73998991e3891c8d2afd3ab10569bb4
1 parent
b2cf9e81
解决wkwebview 时序 引起 定位不准问题
review by 枪兵
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
2 deletions
YHExplorer/YHExplorerView.m
YHExplorer/YHExplorerView.m
View file @
4c1f6da
...
...
@@ -247,10 +247,9 @@
#pragma mark - Gesture Handlers
-
(
void
)
hanldeTapGesture
:
(
UITapGestureRecognizer
*
)
gesture
{
if
(
gesture
==
_tapGesture
)
{
CGPoint
touchPoint
=
[
gesture
locationInView
:
self
.
webView
];
CGFloat
displayWidth
=
[[
self
.
webViewController
stringByEvaluatingJavaScriptFromString
:
@"window.innerWidth"
]
floatValue
];
CGFloat
scale
=
self
.
webView
.
frame
.
size
.
width
/
displayWidth
;
CGPoint
touchPoint
=
[
gesture
locationInView
:
self
.
webView
];
// 如果webview是zoom状态,把对应的比例除去
touchPoint
.
x
/=
scale
;
touchPoint
.
y
/=
scale
;
...
...
Please
register
or
login
to post a comment