title: Done Button not working at programmatic UIBarButtonItem and UIPickerView
body: <p>I am creating a <code>UIPickerView</code>, <code>UIToolbar</code>, <code>UIBarButtonItem</code> and <code>UIButton</code> programmatically. I'v set the custom picker as an inputView of a textView and everything works without problem except the Done button. </p>
  
  <p>Does anyone have any idea of what the problem is?</p>
  
  <p>The code I've used is:</p>
  
  <pre><code>// initialize picker
  CGRect cgRect =[[UIScreen mainScreen] bounds];
  CGSize cgSize = cgRect.size;
  
  _picker = [[UIPickerView alloc] init];
  _picker.frame=CGRectMake(0, 0, cgSize.width, cgSize.height);
  _picker.showsSelectionIndicator = YES;
  _picker.delegate = self;
  
  // toolbar of picker
  UIToolbar* toolbar = [[UIToolbar alloc] init];
  toolbar.frame=CGRectMake(0, 0, cgSize.width, 35);
  toolbar.barStyle = UIBarStyleBlackTranslucent;
  
  UIBarButtonItem *flexibleSpaceLeft = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];
  
  UIButton *customButton = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, 60, 33)];
  [customButton setTitle:@"Done" forState:UIControlStateNormal];
  [customButton addTarget:self action:@selector(doneClicked:) forControlEvents:UIControlEventTouchUpInside];
  UIBarButtonItem *barCustomButton =[[UIBarButtonItem alloc] initWithCustomView:customButton];
  
  NSMutableArray * arr = [NSMutableArray arrayWithObjects:flexibleSpaceLeft, barCustomButton, nil];
  [toolbar setItems:arr animated:YES];
  self.txtTeam.inputView = _picker;
  [_picker addSubview:toolbar];
  </code></pre>
  
  <p>And the <code>doneClicked</code> method is;</p>
  
  <pre><code>    -(void)doneClicked
  {
      NSLog(@"Done button clicked.");
      [self.txtTeam resignFirstResponder];
  }
  </code></pre>
  
  <p>But the Done button is not clickable. </p>