ios8023
- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view
{
UILabel *myView = nil;      
if (component == 0) {
myView = [[[UILabel alloc] initWithFrame:CGRectMake(0.0, 0.0, 100, 30)] autorelease];
myView.textAlignment = UITextAlignmentCenter;
myView.text = [pickerNameArray objectAtIndex:row];
myView.font = [UIFont systemFontOfSize:14];         //用label来设置字体大小
myView.backgroundColor = [UIColor clearColor];
}else {
myView = [[[UILabel alloc] initWithFrame:CGRectMake(0.0, 0.0, 180, 30)] autorelease];
myView.text = [pickerPlaceArray objectAtIndex:row];
myView.textAlignment = UITextAlignmentCenter;
myView.font = [UIFont systemFontOfSize:14];
myView.backgroundColor = [UIColor clearColor];
}
return myView;
}

分类:

技术点:

相关文章:

  • 2021-07-09
  • 2021-11-12
  • 2021-04-14
  • 2021-07-01
  • 2021-07-16
  • 2021-11-03
  • 2021-12-04
  • 2021-11-10
猜你喜欢
  • 2021-06-06
  • 2021-10-02
  • 2021-11-21
  • 2021-11-16
  • 2021-09-24
  • 2021-09-24
  • 2021-05-23
相关资源
相似解决方案