开发者

UIPicker With View + View Tapped != Selected Row

开发者 https://www.devze.com 2023-01-24 11:01 出处:网络
Hey!I have a UIPicker, and I am using the function: - (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInt开发者_运维百科eger)row

Hey! I have a UIPicker, and I am using the function:

- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInt开发者_运维百科eger)row
      forComponent:(NSInteger)component reusingView:(UIView *)view {

But, when you tap one of the views returned by this function, the tapped view does not become highlighed, and selected if the touch is released. How can I fix that?


Make use of this property,

pickerView.showsSelectionIndicator = YES;

at initialization.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号