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
"...xcshareddata/xcschemes/SimpleExample.xcscheme" did not exist on "49604e046cde4e010588c1c40f58a27a81161ce0"
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
Hide 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 @@
...
@@ -46,7 +46,6 @@
[
self
addSubview
:
view
];
[
self
addSubview
:
view
];
self
.
leftBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
self
.
leftBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
self
.
leftBtn
.
frame
=
CGRectMake
(
10
,
5
,
90
,
30
);
self
.
leftBtn
.
frame
=
CGRectMake
(
10
,
5
,
90
,
30
);
[
self
.
leftBtn
setTitle
:
self
.
leftStr
forState
:
UIControlStateNormal
];
[
self
.
leftBtn
setTitle
:
self
.
leftStr
forState
:
UIControlStateNormal
];
...
@@ -67,11 +66,9 @@
...
@@ -67,11 +66,9 @@
[
self
.
rightBtn
setTitleColor
:[
self
colorWith
:
rightbtnbgColor
]
forState
:
UIControlStateNormal
];
[
self
.
rightBtn
setTitleColor
:[
self
colorWith
:
rightbtnbgColor
]
forState
:
UIControlStateNormal
];
[
view
addSubview
:
self
.
rightBtn
];
[
view
addSubview
:
self
.
rightBtn
];
[
self
.
rightBtn
setFont
:[
UIFont
systemFontOfSize
:[
_pickerToolBarFontSize
integerValue
]]];
[
self
.
rightBtn
setFont
:[
UIFont
systemFontOfSize
:[
_pickerToolBarFontSize
integerValue
]]];
[
self
.
rightBtn
addTarget
:
self
action
:
@selector
(
cfirmAction
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
rightBtn
addTarget
:
self
action
:
@selector
(
cfirmAction
)
forControlEvents
:
UIControlEventTouchUpInside
];
UILabel
*
cenLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
90
,
5
,
SCREEN_WIDTH
-
180
,
30
)];
UILabel
*
cenLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
90
,
5
,
SCREEN_WIDTH
-
180
,
30
)];
...
@@ -84,9 +81,8 @@
...
@@ -84,9 +81,8 @@
[
cenLabel
setTextColor
:[
self
colorWith
:
centerbtnColor
]];
[
cenLabel
setTextColor
:[
self
colorWith
:
centerbtnColor
]];
[
view
addSubview
:
cenLabel
];
[
view
addSubview
:
cenLabel
];
self
.
pick
=
[[
UIPickerView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
40
,
self
.
frame
.
size
.
width
,
self
.
frame
.
size
.
height
-
40
)];
self
.
pick
=
[[
UIPickerView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
40
,
self
.
frame
.
size
.
width
,
self
.
frame
.
size
.
height
-
40
)];
self
.
pick
.
delegate
=
self
;
self
.
pick
.
delegate
=
self
;
self
.
pick
.
dataSource
=
self
;
self
.
pick
.
dataSource
=
self
;
self
.
pick
.
showsSelectionIndicator
=
YES
;
self
.
pick
.
showsSelectionIndicator
=
YES
;
...
@@ -100,7 +96,6 @@
...
@@ -100,7 +96,6 @@
if
(
_Correlation
)
{
if
(
_Correlation
)
{
//这里是关联的
//这里是关联的
if
([
_numberCorrela
isEqualToString
:
@"three"
])
{
if
([
_numberCorrela
isEqualToString
:
@"three"
])
{
return
3
;
return
3
;
}
else
if
([
_numberCorrela
isEqualToString
:
@"two"
]){
}
else
if
([
_numberCorrela
isEqualToString
:
@"two"
]){
...
@@ -192,6 +187,7 @@
...
@@ -192,6 +187,7 @@
if
(
_Correlation
)
{
if
(
_Correlation
)
{
if
([
_numberCorrela
isEqualToString
:
@"three"
])
{
if
([
_numberCorrela
isEqualToString
:
@"three"
])
{
_lineWith
=
SCREEN_WIDTH
-
2
*
linSpace
;
_lineWith
=
SCREEN_WIDTH
-
2
*
linSpace
;
if
(
self
.
weightArry
.
count
>=
3
)
{
if
(
self
.
weightArry
.
count
>=
3
)
{
...
@@ -376,8 +372,9 @@
...
@@ -376,8 +372,9 @@
self
.
selectthreeAry
=
[[
self
.
dataDry
objectAtIndex
:
setline
]
objectForKey
:[
self
.
provinceArray
objectAtIndex
:
setline
]];
self
.
selectthreeAry
=
[[
self
.
dataDry
objectAtIndex
:
setline
]
objectForKey
:[
self
.
provinceArray
objectAtIndex
:
setline
]];
//NSLog(@"%@",_selectthreeAry);
//NSLog(@"%@",_selectthreeAry);
self
.
townArray
=
[[
self
.
selectthreeAry
objectAtIndex
:
row
]
objectForKey
:[
self
.
cityArray
objectAtIndex
:
row
]];
if
(
row
<
self
.
selectthreeAry
.
count
)
{
self
.
townArray
=
[[
self
.
selectthreeAry
objectAtIndex
:
row
]
objectForKey
:[
self
.
cityArray
objectAtIndex
:
row
]];
}
}
else
{
}
else
{
setline
=
0
;
setline
=
0
;
...
@@ -385,7 +382,7 @@
...
@@ -385,7 +382,7 @@
self
.
selectthreeAry
=
[[
self
.
dataDry
objectAtIndex
:
0
]
objectForKey
:[
self
.
provinceArray
objectAtIndex
:
0
]];
self
.
selectthreeAry
=
[[
self
.
dataDry
objectAtIndex
:
0
]
objectForKey
:[
self
.
provinceArray
objectAtIndex
:
0
]];
//NSLog(@"%ld",(long)row);
//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
];
[
pickerView
reloadAllComponents
];
...
@@ -429,17 +426,21 @@
...
@@ -429,17 +426,21 @@
NSString
*
b
=
[
self
.
cityArray
objectAtIndex
:[
self
.
pick
selectedRowInComponent
:
1
]];
NSString
*
b
=
[
self
.
cityArray
objectAtIndex
:[
self
.
pick
selectedRowInComponent
:
1
]];
NSString
*
c
=
[
self
.
townArray
objectAtIndex
:[
self
.
pick
selectedRowInComponent
:
2
]];
NSString
*
c
=
[
self
.
townArray
objectAtIndex
:[
self
.
pick
selectedRowInComponent
:
2
]];
[
self
.
backArry
addObject
:
a
];
if
(
a
&&
b
&&
c
)
{
[
self
.
backArry
addObject
:
b
];
[
self
.
backArry
addObject
:
a
];
[
self
.
backArry
addObject
:
c
];
[
self
.
backArry
addObject
:
b
];
[
self
.
backArry
addObject
:
c
];
}
}
else
if
([
_numberCorrela
isEqualToString
:
@"two"
]){
}
else
if
([
_numberCorrela
isEqualToString
:
@"two"
]){
NSString
*
a
=
[
self
.
provinceArray
objectAtIndex
:[
self
.
pick
selectedRowInComponent
:
0
]];
NSString
*
a
=
[
self
.
provinceArray
objectAtIndex
:[
self
.
pick
selectedRowInComponent
:
0
]];
NSString
*
b
=
[
self
.
cityArray
objectAtIndex
:[
self
.
pick
selectedRowInComponent
:
1
]];
NSString
*
b
=
[
self
.
cityArray
objectAtIndex
:[
self
.
pick
selectedRowInComponent
:
1
]];
// NSLog(@"%@---%@",a,b);
// NSLog(@"%@---%@",a,b);
[
self
.
backArry
addObject
:
a
];
if
(
a
&&
b
)
{
[
self
.
backArry
addObject
:
b
];
[
self
.
backArry
addObject
:
a
];
[
self
.
backArry
addObject
:
b
];
}
}
}
}
else
}
else
...
@@ -468,8 +469,9 @@
...
@@ -468,8 +469,9 @@
[
dic
setValue
:
@"select"
forKey
:
@"type"
];
[
dic
setValue
:
@"select"
forKey
:
@"type"
];
[
dic
setValue
:[
self
getselectIndexArry
]
forKey
:
@"selectedIndex"
];
[
dic
setValue
:[
self
getselectIndexArry
]
forKey
:
@"selectedIndex"
];
if
(
self
.
backArry
.
count
>
0
)
{
self
.
bolock
(
dic
);
self
.
bolock
(
dic
);
}
}
}
//判断进来的类型是那种
//判断进来的类型是那种
-
(
void
)
getStyle
-
(
void
)
getStyle
...
...
package.json
View file @
99e66eeb
{
{
"name"
:
"react-native-picker"
,
"name"
:
"react-native-picker"
,
"version"
:
"4.0.1
3
"
,
"version"
:
"4.0.1
4
"
,
"description"
:
""
,
"description"
:
""
,
"main"
:
"index.js"
,
"main"
:
"index.js"
,
"scripts"
:
{
"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