Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iPhone UIPickerView问题_Iphone - Fatal编程技术网

iPhone UIPickerView问题

iPhone UIPickerView问题,iphone,Iphone,朋友 我的水平UIPickerView有问题。谁能帮我把这个问题缩短一下吗? 事实上,我得到了水平选择器视图,但我有问题,选择器视图内的数据数组不清晰,它的可见性不好,我给你看图片我到底想要什么对不起,我不能添加,所以请帮助我 这是我的代码: - (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIVi

朋友 我的水平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 ;
}

您不应该使用
cGraffineTransformScale(rotate,2.0,2.0)
将标签缩放2倍,这就是为什么它不是像素完美清晰的原因,如果您想要更大的标签,您应该将字体大小加倍。将3.14替换为常量
M_PI
您不应该使用
cGraffineTransformScale(旋转,2.0,2.0)
将标签缩放2倍,这就是为什么它不是像素完美清晰的原因,如果您想要更大的标签,您应该将字体大小加倍。将3.14替换为常量
M_PI

将图片添加到某个免费上传站点。并给我链接。然后我将上传它。这是图像链接,所有的小灰色标签都是标签。你将无法上传图像,因为你的代表分数低于15。谢谢Shubhank你有解决方案。我得到了所有东西,但我的数据不是清楚当我有增加规模,它看起来太糟糕了。添加图片到一些免费上传网站..并给我链接..我会上传它然后这是图像的链接和所有小灰色标签你将无法上传图像,因为你的代表点低于15感谢Shubhank你有这个解决方案我得到了一切,但我的数据不清楚当我增加比例时,它看起来太糟糕了。