- (UIView*)pickerView:(UIPickerView*)pickerView viewForRow:(NSInteger)row
forComponent:(NSInteger)component reusingView:(UIView*)view
{
//設(shè)置分割線的顏色
for(UIView*singleLineinpickerView.subviews)
{
if(singleLine.frame.size.height<1)
{
singleLine.backgroundColor=kSingleLineColor;
}
}
//設(shè)置文字的屬性
UILabel*genderLabel = [UILabelnew];
genderLabel.textAlignment=NSTextAlignmentCenter;
genderLabel.text=self.genderArray[row];//self.genderArray里邊內(nèi)容為@[@"男",@"女"]
genderLabel.textColor=kSpecialTextColor;
returngenderLabel;
}