1
是否可以在弹出窗口中的UIViewController中显示工具栏项目?我在我的视图控制器的viewDidLoad方法这样做:popover中的UIToolbar
UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:nil action:nil];
[self setToolbarItems:[NSArray arrayWithObject:addButton]];
[addButton release];
然后我在UINavigationController
包装这个视图控制器(其中有一个toolbar
财产,并根据文档,我应该使用setToolbarItems
方法UIViewController
将项目添加到工具栏),然后将其呈现在弹出窗口中。
我没有看到工具栏。使用弹出窗口时工具栏是否不受支持?
感谢
谢谢!我现在要使用它... – 2011-03-30 05:36:22
好吧,它工作:)但我似乎无法添加按钮。很可能会很快弄清楚。再次感谢。 – 2011-03-30 05:46:57
一个善良的人只为我回答了一个问题:这些按钮被添加到popover中显示的视图中。 [链接] http://stackoverflow.com/questions/10853038/how-do-i-add-buttons-to-a-toolbar-within-an-ipad-popover [/链接] – mpemburn 2012-06-01 19:58:52