I'm trying to give my UIToolBar a title, but when I try to add a UIBarItem with a title attribute, I get this error. My code:
UIBarItem *title = [[UIBarItem alloc] init];
title.title = @"My Title";
[toolBar setItems:@[cancel, title, ok]];
I've check the official docs for UIBarItem, and it does indeed have a perfectly valid "title" attribute. What am I doing wrong here?