Closed kayrules closed 10 years ago
Changing the original code in QRadioElement.m line 78 & 86 to codes below should fix it:
- (QRadioElement *)initWithItems:(NSArray *)stringArray selected:(NSInteger)selected {
self = [self initWithItems:stringArray selected:selected title:nil];
_selected = selected; //<-- Initially _selected = -1;
return self;
}
- (QRadioElement *)initWithDict:(NSDictionary *)valuesDictionary selected:(int)selected title:(NSString *)title {
self = [self initWithItems:valuesDictionary.allKeys selected:(NSUInteger) selected];
_values = valuesDictionary.allValues;
_selected = selected; //<-- Initially _selected = -1;
self.title = title;
return self;
}
If QRadioElement initiated "without" title parameter, it will not showing the default value as per defined. no checkmark showed on the detail view. But if manually selected, the value will appear as normal.
I'm not sure if this is valid issue or not, because it even happened on demo project.