UIPickerView selection indicator not visible in iOS10
<p>I build my project in Xcode 8. UIPickerView separator lines are not visible in iOS 10 simulator and the devices, but works fine on iOS 9.3 devices and simulator. I tried to adjust the UIPickerView back ground color, auto layouts and everything possible in the XIB, but nothing works. Anyone have an idea on this?</p>
<p>This is a custom view which contains a UIPickerView</p>
<p><a href="https://i.stack.imgur.com/fBSid.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fBSid.png" alt="enter image description here" /></a></p>
<pre><code>-(void)layoutSubviews{
    isShown = NO;
    [super layoutSubviews];
    
    //self.selectedDic = nil;
    
    self.doneBtn.tintColor = COLOR_DB3535;
    self.pickerView.backgroundColor = COLOR_DEDEDE;
    self.pickerView.showsSelectionIndicator = YES;
    
    [self.doneBtn setTitle:NSLocalizedString(@&quot;App_Generic_Button_Text_Done&quot;, @&quot;&quot;)];
    }


    -(UIView*)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view{
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 320, 50)];
    label.tintColor = [UIColor clearColor];
    label.backgroundColor = [UIColor yellowColor];
    label.textColor = COLOR_666;
    label.font = [FontsManager getFONT_ROBOTO_LIGHT_16];
    label.textAlignment = NSTextAlignmentCenter;
    NSDictionary *dict = [dataArray objectAtIndex:row];
    label.text = @&quot;Test&quot;;
    return label;
}
</code></pre>