Come nascondere il separatore nella mia vista di selezione. Ecco lo screenshot .Separatore righe in UIPickerView
Ecco il codice per il mio UIPickerView personalizzato.
- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view {
UILabel *label=[[UILabel alloc]init];
label.backgroundColor = [UIColor clearColor];
label.textColor = [UIColor whiteColor];
label.textAlignment=NSTextAlignmentCenter;
switch (component) {
case 0:
label.text=[_hourArray objectAtIndex:row];
label.font = [UIFont fontWithName:@"MYRIADPRO-REGULAR" size:70];
break;
case 1:
label.text=[_minutesArray objectAtIndex:row];
label.font = [UIFont fontWithName:@"MYRIADPRO-REGULAR" size:70];
break;
case 2:
label.text=[_ampmArray objectAtIndex:row];
label.font = [UIFont fontWithName:@"MYRIADPRO-REGULAR" size:15];
break;
default:
break;
}
return label;
}
-(NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView {
return 3;
}
Please help me out.Thanks
provare questo http://stackoverflow.com/a/11451471/887325 – Bimawa
domanda simile è stato chiesto qui (http://stackoverflow.com/questions/20612279/uipickerview-how-to-hide-the-selection -indicatore). Il collegamento di Bimawa è utile. Ho provato questo approccio e ha funzionato. – morksinaanab