You cannot add it using IB, but you can do it programmatically. You will need to set its contentInset so that the text content is not edited, because the content will become invisible due to the limited size of the text view. I added that in the example code below.
Code example
UITextView * textView = [[[UITextView alloc] initWithFrame:CGRectMake(0, 0, 100, 32)] autorelease]; textView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0); UIBarButtonItem * barItem = [[[UIBarButtonItem alloc] initWithCustomView:textView] autorelease]; self.toolbar.items = [NSArray arrayWithObject:barItem];
source share