gpt4 book ai didi

iphone - UIPickerView字体

转载 作者:技术小花猫 更新时间:2023-10-29 10:18:41 34 4
gpt4 key购买 nike

有谁知道是否可以更改单个 UIPickerView 项目的字体和/或颜色?

最佳答案

- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view{
UILabel* tView = (UILabel*)view;
if (!tView){
tView = [[UILabel alloc] init];
// Setup label properties - frame, font, colors etc
...
}
// Fill the label text here
...
return tView;
}

关于iphone - UIPickerView字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5515528/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com