简体   繁体   中英

Overriding highlighted selection in UIPickerView

I have a custom UIPickerView where I use:

-(UIView *)pickerView:(UIPickerView *)pickerView
           viewForRow:(NSInteger)row
         forComponent:(NSInteger)component 
          reusingView:(UIView *)view

to fill the picker with UIView which has two labels. Is there a way to enable the behavior of highlighting the selected row when touched?

只需在选择器视图的初始化时添加它。

 pickerView.showsSelectionIndicator = YES;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM