标签:color sp on 代码 ef bs as ui rgb
1、网上找的
这个是MRC代码:
UIPickerView *pickerView = [[UIPickerView alloc] initWithFrame:CGRectZero];
CGRect pickerRect = CGRectMake(680, 60, 100, 650);
pickerView.frame = pickerRect;
CGFloat color[4] = {1,1,0,1};
CGColorSpaceRef rgb = CGColorSpaceCreateDeviceRGB();
CGColorRef layerBounderColor = CGColorCreate(rgb, color);
CGColorSpaceRelease(rgb);
CALayer *viewLayer = pickerView.layer;
[viewLayer setBounds:CGRectMake(580, -50, 80, 700)];
[viewLayer setBackgroundColor:layerBounderColor];
[viewLayer setContentsRect:CGRectMake(0, 0, 100, 150)];
[viewLayer setBorderWidth:20];
[viewLayer setBorderColor:layerBounderColor];
CGColorRelease(layerBounderColor);
2、其实就是改Layer
CALayer *viewLayer = pickerView.layer;
[viewLayer setFrame:CGRectMake(580, -50, 80, 700)];
[viewLayer setBorderWidth:0];
标签:color sp on 代码 ef bs as ui rgb
原文地址:http://www.cnblogs.com/yudigege/p/4032001.html