I have an application based on the navigation controller and added some toolbar elements with code in 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;
now I want to show the actionSheet with [UIActionSheet showFromToolbar:] and I want UIToolbar * , how can I get the UIToolbar that I created earlier?
source share