UIPickerView

[AlarmSoundPicker selectRow:Rowindex inComponent:0 animated:YES];
 * http://forums.macrumors.com/showthread.php?t=541813

- (UIView*)pickerView:(UIPickerView*)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView*)view {
 * http://stackoverflow.com/questions/310786/uipickerview-row-color

CGRect imageFrame = CGRectMake(0.0, 0.0, 15, 15); UIImageView *label = [[UIImageView alloc] initWithFrame:imageFrame];

if (row == 0) {       label.backgroundColor = [UIColor redColor]; }   if (row == 1) {       label.backgroundColor = [UIColor blueColor]; }   if (row == 2) {       label.backgroundColor = [UIColor blackColor]; }      return label; } "Shouldn't you use the reusingView parameter ? It is similar to UITableView's reuse pool."

Transparent selection bar
 * http://aralbalkan.com/2985

- (void)viewDidLoad { // Add pickerView self.pickerView = [[UIPickerView alloc] initWithFrame:CGRectZero];   [pickerView release];    CGSize pickerSize = [pickerView sizeThatFits:CGSizeZero];    CGRect screenRect = [[UIScreen mainScreen] applicationFrame];    #define toolbarHeight               40.0    CGFloat pickerTop = screenRect.size.height - toolbarHeight - pickerSize.height;    CGRect pickerRect = CGRectMake(0.0, pickerTop, pickerSize.width, pickerSize.height);    pickerView.frame = pickerRect;
 * http://stackoverflow.com/questions/367471/fixed-labels-in-the-selection-bar-of-a-uipickerview

// Add label on top of pickerView CGFloat top = pickerTop + 2; CGFloat height = pickerSize.height - 2; [self addPickerLabel:@"x" rightX:123.0 top:top height:height]; [self addPickerLabel:@"y" rightX:183.0 top:top height:height]; //... }

- (void)addPickerLabel:(NSString *)labelString rightX:(CGFloat)rightX top:(CGFloat)top height:(CGFloat)height { UIFont *font = [UIFont boldSystemFontOfSize:PICKER_LABEL_FONT_SIZE]; CGFloat x = rightX - [labelString sizeWithFont:font].width;
 * 1) define PICKER_LABEL_FONT_SIZE 18
 * 2) define PICKER_LABEL_ALPHA 0.7

// White label 1 pixel below, to simulate embossing. UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(x, top + 1, rightX, height)];   label.text = labelString;    label.font = font;    label.textColor = [UIColor whiteColor];    label.backgroundColor = [UIColor clearColor];    label.opaque = NO;    label.alpha = PICKER_LABEL_ALPHA;    [self.view addSubview:label];    [label release];

// Actual label. label = [[UILabel alloc] initWithFrame:CGRectMake(x, top, rightX, height)];   label.text = labelString;    label.font = font;    label.backgroundColor = [UIColor clearColor];    label.opaque = NO;    label.alpha = PICKER_LABEL_ALPHA;    [self.view addSubview:label];    [label release]; }