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
99e66eeb
Commit
99e66eeb
authored
Dec 27, 2016
by
xwenliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix scroll two wheels crash
parent
efed693d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
18 deletions
+20
-18
ios/RCTBEEPickerManager/BzwPicker.m
ios/RCTBEEPickerManager/BzwPicker.m
+19
-17
package.json
package.json
+1
-1
No files found.
ios/RCTBEEPickerManager/BzwPicker.m
View file @
99e66eeb
...
...
@@ -46,7 +46,6 @@
[
self
addSubview
:
view
];
self
.
leftBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
self
.
leftBtn
.
frame
=
CGRectMake
(
10
,
5
,
90
,
30
);
[
self
.
leftBtn
setTitle
:
self
.
leftStr
forState
:
UIControlStateNormal
];
...
...
@@ -67,12 +66,10 @@
[
self
.
rightBtn
setTitleColor
:[
self
colorWith
:
rightbtnbgColor
]
forState
:
UIControlStateNormal
];
[
view
addSubview
:
self
.
rightBtn
];
[
self
.
rightBtn
setFont
:[
UIFont
systemFontOfSize
:[
_pickerToolBarFontSize
integerValue
]]];
[
self
.
rightBtn
addTarget
:
self
action
:
@selector
(
cfirmAction
)
forControlEvents
:
UIControlEventTouchUpInside
];
UILabel
*
cenLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
90
,
5
,
SCREEN_WIDTH
-
180
,
30
)];
cenLabel
.
textAlignment
=
NSTextAlignmentCenter
;
...
...
@@ -86,7 +83,6 @@
[
view
addSubview
:
cenLabel
];
self
.
pick
=
[[
UIPickerView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
40
,
self
.
frame
.
size
.
width
,
self
.
frame
.
size
.
height
-
40
)];
self
.
pick
.
delegate
=
self
;
self
.
pick
.
dataSource
=
self
;
self
.
pick
.
showsSelectionIndicator
=
YES
;
...
...
@@ -100,7 +96,6 @@
if
(
_Correlation
)
{
//这里是关联的
if
([
_numberCorrela
isEqualToString
:
@"three"
])
{
return
3
;
}
else
if
([
_numberCorrela
isEqualToString
:
@"two"
]){
...
...
@@ -192,6 +187,7 @@
if
(
_Correlation
)
{
if
([
_numberCorrela
isEqualToString
:
@"three"
])
{
_lineWith
=
SCREEN_WIDTH
-
2
*
linSpace
;
if
(
self
.
weightArry
.
count
>=
3
)
{
...
...
@@ -376,8 +372,9 @@
self
.
selectthreeAry
=
[[
self
.
dataDry
objectAtIndex
:
setline
]
objectForKey
:[
self
.
provinceArray
objectAtIndex
:
setline
]];
//NSLog(@"%@",_selectthreeAry);
if
(
row
<
self
.
selectthreeAry
.
count
)
{
self
.
townArray
=
[[
self
.
selectthreeAry
objectAtIndex
:
row
]
objectForKey
:[
self
.
cityArray
objectAtIndex
:
row
]];
}
}
else
{
setline
=
0
;
...
...
@@ -385,7 +382,7 @@
self
.
selectthreeAry
=
[[
self
.
dataDry
objectAtIndex
:
0
]
objectForKey
:[
self
.
provinceArray
objectAtIndex
:
0
]];
//NSLog(@"%ld",(long)row);
self
.
townArray
=
[[
self
.
selectthreeAry
objectAtIndex
:
row
]
objectForKey
:[
self
.
cityArray
objectAtIndex
:
row
]];
self
.
townArray
=
[[
self
.
selectthreeAry
objectAtIndex
:
0
]
objectForKey
:[
self
.
cityArray
objectAtIndex
:
0
]];
}
[
pickerView
reloadAllComponents
];
...
...
@@ -429,18 +426,22 @@
NSString
*
b
=
[
self
.
cityArray
objectAtIndex
:[
self
.
pick
selectedRowInComponent
:
1
]];
NSString
*
c
=
[
self
.
townArray
objectAtIndex
:[
self
.
pick
selectedRowInComponent
:
2
]];
if
(
a
&&
b
&&
c
)
{
[
self
.
backArry
addObject
:
a
];
[
self
.
backArry
addObject
:
b
];
[
self
.
backArry
addObject
:
c
];
}
}
else
if
([
_numberCorrela
isEqualToString
:
@"two"
]){
NSString
*
a
=
[
self
.
provinceArray
objectAtIndex
:[
self
.
pick
selectedRowInComponent
:
0
]];
NSString
*
b
=
[
self
.
cityArray
objectAtIndex
:[
self
.
pick
selectedRowInComponent
:
1
]];
// NSLog(@"%@---%@",a,b);
if
(
a
&&
b
)
{
[
self
.
backArry
addObject
:
a
];
[
self
.
backArry
addObject
:
b
];
}
}
}
else
{
...
...
@@ -468,8 +469,9 @@
[
dic
setValue
:
@"select"
forKey
:
@"type"
];
[
dic
setValue
:[
self
getselectIndexArry
]
forKey
:
@"selectedIndex"
];
if
(
self
.
backArry
.
count
>
0
)
{
self
.
bolock
(
dic
);
}
}
//判断进来的类型是那种
-
(
void
)
getStyle
...
...
package.json
View file @
99e66eeb
{
"name"
:
"react-native-picker"
,
"version"
:
"4.0.1
3
"
,
"version"
:
"4.0.1
4
"
,
"description"
:
""
,
"main"
:
"index.js"
,
"scripts"
:
{
...
...
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