title: Checkable UIPickerView in iPhone Safari
body: <p>I try to custom my pickerview to be checkable like when you click dropdownlist on webview as in the picture (youtube website).</p>
  
  <p><img src="https://i.stack.imgur.com/GbCzb.png" alt="enter image description here">
  <a href="http://img830.imageshack.us/img830/3747/screenshot20101004at606.png" rel="nofollow noreferrer">http://img830.imageshack.us/img830/3747/screenshot20101004at606.png</a></p>
  
  <p>I use viewForRow method to customize view for each row in picker.</p>
  
  <pre><code>- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view
  {
  
   UIView *rowView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 280, 44)] autorelease];
   rowView.backgroundColor = [UIColor clearColor];
   rowView.userInteractionEnabled = NO;
  
   UIImageView *checkmarkImageView = [[UIImageView alloc] initWithFrame:CGRectMake(5, 10, 24, 19)];
  
   UIFont *font = [ UIFont boldSystemFontOfSize:18];
   UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(35, 0, 240, 44) ];
   NSString *pickerText = [[Itemlist objectAtIndex:row] objectForKey:@"name"];
   titleLabel.text = pickerText;
   titleLabel.textAlignment = UITextAlignmentLeft;
   titleLabel.backgroundColor = [UIColor clearColor];
   titleLabel.font = font;
   titleLabel.opaque = NO;
  
   if ([selected_property_id intValue] == row) {
    titleLabel.textColor = [UIColor blueColor];
    checkmarkImageView.image = [UIImage imageNamed:@"checkmark.png"];
   }else {
    titleLabel.textColor = [UIColor blackColor];
    checkmarkImageView.image = nil;
   }
  
   [rowView addSubview:checkmarkImageView];
   [rowView addSubview:titleLabel];
   [titleLabel release];
   [checkmarkImageView release];
  
   return rowView; 
  
  }
  
  
  - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
  {
   [m_pickerView reloadAllComponents];
  }
  </code></pre>
  
  <p>When I select the row that I want, it add checkmark to the selected row perfectly
  BUT when I scroll picker up/down the picker will auto select the row at the middle of picker. So, it auto add checkmark in the middle row.</p>
  
  <p>My question is how to disable auto select on the middle row.
  It should add checkmark when user tab on the row that they want only (like in youtube).</p>
  
  <p>Should I use touch event method for pickerview?</p>
  
  <p>Thanks for the help.</p>