在iPad应用程序中,我希望能够在弹出窗口的顶部栏中有多个按钮。我启动它是这样的:自定义UIPopoverController中的titleView
UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:vc];
pop = [[UIPopoverController alloc] initWithContentViewController:nc];
[pop presentPopoverFromRect:CGRectInset([tableView rectForRowAtIndexPath:indexPath], 10, 10)
inView:tableView
permittedArrowDirections:UIPopoverArrowDirectionAny
animated:YES];
pop.delegate = self;
[nc release];
在viewDidLoad
我想设置于titleview包含多个UIBarButtonItems
。这在正常的UINavigationController
上没问题,但我需要能够做到这一点,并保持导航栏的自定义样式在弹出窗口上。
我已经尝试设置rightBarButtonItem
有一个包含按钮的工具栏,但它们采用工具栏的格式,它本身不会采用弹出窗口的格式/样式。
你可以指定“格式/风格”是什么意思,你如何将它们设置为弹出? – Zapko 2011-05-31 06:56:02
忽略我的问题一分钟,创建一个导航控制器在其中的popover。你会看到按钮的光芒自动匹配边框/箭头的光芒。现在,设置一个导航。控制器按钮是一个比如说UIToolBar(通常会把多个按钮放进去)。该工具栏中按钮的格式将不符合弹出窗口的光泽。 – Lee 2011-06-01 09:48:14