Return selected index if returned selected array is empty

Return selected index if returned selected array is empty
parent c927541b
...@@ -456,8 +456,15 @@ ...@@ -456,8 +456,15 @@
[dic setValue:self.backArry forKey:@"selectedValue"]; [dic setValue:self.backArry forKey:@"selectedValue"];
[dic setValue:@"select" forKey:@"type"]; [dic setValue:@"select" forKey:@"type"];
NSMutableArray *value = [self getselectIndexArry];
if([value count] == 0) {
value = [[NSMutableArray alloc] init];
[dic setValue:[NSNumber numberWithInt:[_pick selectedRowInComponent:0]] forKey:@"selectedIndex"];
} else {
[dic setValue:[self getselectIndexArry] forKey:@"selectedIndex"]; [dic setValue:[self getselectIndexArry] forKey:@"selectedIndex"];
}
if (self.backArry.count>0) { if (self.backArry.count>0) {
self.bolock(dic); self.bolock(dic);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment