似乎 UIPickerView 不再支持将 NSAttributedString 用于选取器视图项。谁能证实这一点?我NS_AVAILABLE_IOS(6_0)
在UIPickerView.h
文件中找到了,但这是问题所在吗?有没有办法解决这个问题,还是我不走运?
- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component;
- (NSAttributedString *)pickerView:(UIPickerView *)pickerView attributedTitleForRow:(NSInteger)row forComponent:(NSInteger)component NS_AVAILABLE_IOS(6_0); // attributed title is favored if both methods are implemented
- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view;