title: Done button in uitoolbar
body: <p>Is there anyway to limit the Done button's frame in uitoolbar.I want it to be positioned to the rightside. The problem i face is that the action for done button gets called even if i tap outside the done button in the uitoolbar.I want the done action to be called only if the user taps on it. Can anyone tell me what i should do in the below code.</p>
  
  <pre><code>UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(doneWriting:)];
  
  UIBarButtonItem *flexible = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];
  //flexible.width=310;
  [toolBar setItems:[NSArray arrayWithObjects:flexible,doneButton, nil]];
  [doneButton release];
  [flexible release];
  
  labelItems = [[UITextView alloc] initWithFrame:(IS_IPAD ? CGRectMake(20, 5, 550, 70) : CGRectMake(10, 0, 223, 40))];
  labelItems.delegate=self;
  labelItems.font = [UIFont fontWithName:@"Arial" size:(IS_IPAD ? 33 : 15)];
  labelItems.inputAccessoryView = toolBar;
  </code></pre>