我正在尝试在 UIPicker 中居中并更改文本的大小,但不确定如何...我认为这可能会发生在其中一种方法中,很可能是第一种方法...
- (NSString*)pickerView:(UIPickerView*)pv titleForRow:(NSInteger)row forComponent:(NSInteger)component
{
return [[NSString stringWithFormat:@"%x",row ] uppercaseString]; //Sets picker options as an Uppercase Hex value
}
#pragma mark UIPickerViewDataSource methods
- (NSInteger)numberOfComponentsInPickerView:(UIPickerView*)pv
{
return 5; //5 columns in the picker
}
- (NSInteger)pickerView:(UIPickerView*)pv numberOfRowsInComponent:(NSInteger)component
{
return 16;
}
有人知道如何做到这一点吗?我环顾四周,但文档相当薄......