У меня есть приложение на основе контроллера навигации, и я добавил несколько элементов панели инструментов с кодом в viewDidLoad:
NSArray* toolbarItems = [NSArray arrayWithObjects:
[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd
target:self
action:@selector(addButton)],
[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace
target:self
action:nil],
[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCompose
target:self
action:@selector(composeMail)],
nil];
[toolbarItems makeObjectsPerformSelector:@selector(release)];
self.toolbarItems = toolbarItems;
теперь я хочу показать actionSheet с [UIActionSheet showFromToolbar:]
, и для этого я хочу UIToolbar *, как я могу получить созданный ранее UIToolbar?