title: Dismissing UIPickerView with Done button on UIToolBar
body: <p>I am just trying out which is better with regards to dismissing a <code>UIPickerView</code> -- a button on the navigation bar or a "Done" button on a toolbar above the picker view. I have implemented both buttons, and I am trying to dismiss the picker view and resign first responder.</p>
  
  <p>How can I dismiss the <code>UIPickerView</code> with the "Done" Button on the toolbar?</p>
  
  <p>This is my code for the <code>UIToolBar</code>:</p>
  
  <pre><code>UIToolbar* keyboardDoneButtonView = [[UIToolbar alloc] init];
  keyboardDoneButtonView.barStyle = UIBarStyleBlack;
  keyboardDoneButtonView.translucent = YES;
  keyboardDoneButtonView.tintColor = nil;
  [keyboardDoneButtonView sizeToFit];
  UIBarButtonItem* doneButton = [[[UIBarButtonItem alloc] initWithTitle:@"Done"
                                                                  style:UIBarButtonItemStyleBordered target:self
                                                                 action:@selector(pickerDoneClicked:)] autorelease];
  
  [keyboardDoneButtonView setItems:[NSArray arrayWithObjects:doneButton, nil]];
  
  textField.inputAccessoryView = keyboardDoneButtonView;
  </code></pre>
  
  <p>Could someone help me with this?</p>