Commit 0850b366 authored by zooble's avatar zooble Committed by GitHub

Merge pull request #150 from classcraft/master

Return selected index if returned selected array is empty
parents 4ae2080e 86af6fa4
......@@ -366,7 +366,7 @@
{
NSInteger setline=[_pick selectedRowInComponent:0];
self.selectthreeAry =[[self.dataDry objectAtIndex:setline]objectForKey:[self.provinceArray objectAtIndex:setline]];
//NSLog(@"%@",_selectthreeAry);
......@@ -456,10 +456,17 @@
[dic setValue:self.backArry forKey:@"selectedValue"];
[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:value forKey:@"selectedIndex"];
}
[dic setValue:[self getselectIndexArry] forKey:@"selectedIndex"];
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