朋友们,我在水平 UIPickerView 中遇到问题。有人可以帮我解决这个问题吗?实际上我得到了水平选择器视图,但我有问题选择器视图内的数据数组不清楚,它的可见性不好我向你展示我想要的图片对不起我无法添加所以请帮助我。
这是我的代码:
- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view{
CGRect rect = CGRectMake(0, 0, 180, 30);
UILabel *label = [[UILabel alloc]initWithFrame:rect];
CGAffineTransform rotate = CGAffineTransformMakeRotation(3.14/2);
rotate = CGAffineTransformScale(rotate, 2.0, 2.0);
[label setTransform:rotate];
label.text = [pickerArray objectAtIndex:row];
label.textAlignment = UITextAlignmentCenter;
label.numberOfLines = 2;
label.font = [UIFont fontWithName:@"Verdana-Bold" size:22];
label.lineBreakMode = UILineBreakModeWordWrap;
label.backgroundColor = [UIColor clearColor];
label.clipsToBounds = YES;
return label ;
}