Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
react-native-picker
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ym
react-native-picker
Commits
3558ea34
Commit
3558ea34
authored
Aug 10, 2017
by
sandsyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增iOS picker在滚动中禁用确定按钮事件 防止选择的数据错乱
parent
4ae2080e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
ios/RCTBEEPickerManager/BzwPicker.m
ios/RCTBEEPickerManager/BzwPicker.m
+19
-0
No files found.
ios/RCTBEEPickerManager/BzwPicker.m
View file @
3558ea34
...
@@ -603,6 +603,11 @@
...
@@ -603,6 +603,11 @@
//按了确定按钮
//按了确定按钮
-
(
void
)
cfirmAction
-
(
void
)
cfirmAction
{
{
//判断当前是否在滚动选择 如果是 则禁用确定按钮
if
([
self
anySubViewScrolling
:
self
.
pick
])
{
return
;
}
NSMutableDictionary
*
dic
=
[[
NSMutableDictionary
alloc
]
init
];
NSMutableDictionary
*
dic
=
[[
NSMutableDictionary
alloc
]
init
];
if
(
self
.
backArry
.
count
>
0
)
{
if
(
self
.
backArry
.
count
>
0
)
{
...
@@ -939,4 +944,18 @@
...
@@ -939,4 +944,18 @@
}
}
-
(
BOOL
)
anySubViewScrolling
:(
UIView
*
)
view
{
if
([
view
isKindOfClass
:[
UIScrollView
class
]])
{
UIScrollView
*
scrollView
=
(
UIScrollView
*
)
view
;
if
(
scrollView
.
dragging
||
scrollView
.
decelerating
)
{
return
YES
;
}
}
for
(
UIView
*
theSubView
in
view
.
subviews
)
{
if
([
self
anySubViewScrolling
:
theSubView
])
{
return
YES
;
}
}
return
NO
;
}
@end
@end
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