Closed raysarebest closed 7 years ago
Are you using the black version of RMPickerViewController?
I'm setting the blurEffectStyle to .Dark, if that's what you mean
Yes, that is what I mean.
That's a bug on Apples side. The simulator supports tint colors for the UIDatePicker and UIPickerView while the real devices don't. I already submitted a bug report to Apple (It`s No. 18040667 if you want to reference it).
Any workaround for this?
Just found a solution. You need to use this method from the delegate:
- (NSAttributedString *)pickerView:(UIPickerView *)pickerView attributedTitleForRow:(NSInteger)row forComponent:(NSInteger)component;
Example:
- (NSAttributedString *)pickerView:(UIPickerView *)pickerView attributedTitleForRow:(NSInteger)row forComponent:(NSInteger)component
{
NSString *title = @"Picker Value";
NSAttributedString *attString = [[NSAttributedString alloc] initWithString:title attributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
return attString;
}
With Swift:
func pickerView(pickerView: UIPickerView, attributedTitleForRow row: Int, forComponent component: Int) -> NSAttributedString? {
let string = "Picker Value"
return NSAttributedString(string: myString, attributes: [NSForegroundColorAttributeName:UIColor.whiteColor()])
}
Yes, that maybe a working workaround for RMPickerViewController :)
Does not help for RMDateSelectionViewController though, which basically has the same problem in the dark version :/...
it has a bug that content of the pickerView dose not show like something white on it when it is running on swift2.2 xcode7.3 iOS 9.3 .
Same here since iOS 9.3, and I have it on ExtraLight. Is there a workaround for this? I don't necessary need the blur effect if that is what causing the problem. Thanks!
i was facing same issue, i have resolved it with help of @NipulDaki - by change 1 line coding, i given solution to below
At Creation of RMPickerViewController object.
RMPickerViewController *pickerVC = [RMPickerViewController pickerController]; [RMPickerViewController setLocalizedTitleForSelectButton:@"Done"];
* pickerVC.disableBlurEffects=YES; * <-- add this like in your code and RMPickerViewController work without affecting any thing.
Thanks AkshayDegada it work perfectly on iOS 9.3
@AkshayDegada GREAT!! You saved the day!
@AkshayDegada Thanks a lot :)
This problem should be solved somewhere in between iOS 9 and 10.1.1. It is not present in iOS 10.1.1 anymore :). However, for supporting older versions of iOS, the above workaround should be used.
I'm making an app in Swift, and when invoking my instance of RMPickerViewController in the simulator, all goes well, but when I run it on my iPhone 5s on iOS 8.1.1 (built with the iOS 8.2 SDK), none of the options in the picker show, and I'm left with a blank square