Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion ios/RNCPicker.mm
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,15 @@ - (UIView *)pickerView:(UIPickerView *)pickerView
RNCPickerLabel* label = view.subviews[0];
label.font = _font;

label.textColor = [RCTConvert UIColor:_items[row][@"textColor"]] ?: _color;
id colorValue = _items[row][@"textColor"];

// New Architecture: color props is already resolved to UIColor
// Old architecture: JS color value, RCTConvert is required
if ([colorValue isKindOfClass:[UIColor class]]) {
label.textColor = (UIColor *)colorValue;
} else {
label.textColor = [RCTConvert UIColor:colorValue] ?: _color;
}

label.textAlignment = _textAlign;
label.text = [self pickerView:pickerView titleForRow:row forComponent:component];
Expand Down