Skip to content

Commit 4f6de43

Browse files
committed
reverted xmartlabs#948
1 parent 9ead0bb commit 4f6de43

File tree

1 file changed

+11
-25
lines changed

1 file changed

+11
-25
lines changed

XLForm/XL/Cell/XLFormSelectorCell.m

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -57,33 +57,19 @@ -(NSString *)valueDisplayText
5757
}
5858
}
5959
NSMutableArray * descriptionArray = [NSMutableArray arrayWithCapacity:[self.rowDescriptor.value count]];
60-
//add by OE Ex: value taken form the lacal cache but selectorOptions in the networking
61-
if (self.rowDescriptor.selectorOptions.count > 0) {
62-
63-
for (id option in self.rowDescriptor.selectorOptions) {
64-
NSArray * selectedValues = self.rowDescriptor.value;
65-
if ([selectedValues formIndexForItem:option] != NSNotFound){
66-
if (self.rowDescriptor.valueTransformer){
67-
NSAssert([self.rowDescriptor.valueTransformer isSubclassOfClass:[NSValueTransformer class]], @"valueTransformer is not a subclass of NSValueTransformer");
68-
NSValueTransformer * valueTransformer = [self.rowDescriptor.valueTransformer new];
69-
NSString * tranformedValue = [valueTransformer transformedValue:option];
70-
if (tranformedValue){
71-
[descriptionArray addObject:tranformedValue];
72-
}
73-
}
74-
else{
75-
[descriptionArray addObject:[option displayText]];
60+
for (id option in self.rowDescriptor.selectorOptions) {
61+
NSArray * selectedValues = self.rowDescriptor.value;
62+
if ([selectedValues formIndexForItem:option] != NSNotFound){
63+
if (self.rowDescriptor.valueTransformer){
64+
NSAssert([self.rowDescriptor.valueTransformer isSubclassOfClass:[NSValueTransformer class]], @"valueTransformer is not a subclass of NSValueTransformer");
65+
NSValueTransformer * valueTransformer = [self.rowDescriptor.valueTransformer new];
66+
NSString * tranformedValue = [valueTransformer transformedValue:option];
67+
if (tranformedValue){
68+
[descriptionArray addObject:tranformedValue];
7669
}
7770
}
78-
}
79-
} else {
80-
for (id option in self.rowDescriptor.value) {
81-
if ([option isKindOfClass:[XLFormOptionsObject class]]) {
82-
XLFormOptionsObject *newOption = (XLFormOptionsObject*)option;
83-
[descriptionArray addObject:newOption.formDisplayText];
84-
}
85-
else {
86-
[descriptionArray addObject:[NSString stringWithFormat:@"%@",option]];
71+
else{
72+
[descriptionArray addObject:[option displayText]];
8773
}
8874
}
8975
}

0 commit comments

Comments
 (0)