選択した色をtableviewセルを入れて変更することができます。
- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view {
UITableViewCell *cell = (UITableViewCell *)view;
if(cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil] autorelease];
[cell setBackgroundColor:[UIColor redColor]];
[cell setBounds: CGRectMake(0, 0, cell.frame.size.width -20 , 44)];
cell.textLabel.text = [self.userNameArray objectAtIndex:row];
cell.userInteractionEnabled = NO;
}
return cell;
}
出典
2012-07-11 05:58:02
PJR
選択したピッカーの色や全体の色を変更したいですか? – PJR
今は白い全BG色を変更したいです。選択された色さえ(しかし、後で私は選択された色を後で変更します。) – Perseus
投稿されたリンクをチェックして問題を解決します。 – Kuldeep