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
358ba9d3
Commit
358ba9d3
authored
Aug 16, 2017
by
zooble
Committed by
GitHub
Aug 16, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #186 from yushengchu/master
新增iOS picker在滚动中禁用确定按钮事件 防止选择的数据错乱
parents
9bb98a5f
3558ea34
Changes
1
Hide 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 @
358ba9d3
...
...
@@ -612,6 +612,11 @@
//按了确定按钮
-
(
void
)
cfirmAction
{
//判断当前是否在滚动选择 如果是 则禁用确定按钮
if
([
self
anySubViewScrolling
:
self
.
pick
])
{
return
;
}
NSMutableDictionary
*
dic
=
[[
NSMutableDictionary
alloc
]
init
];
if
(
self
.
backArry
.
count
>
0
)
{
...
...
@@ -948,4 +953,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
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