我正在使用以下代码构建 UISplitviewController:
- (void)splitViewController:(UISplitViewController *)svc
willHideViewController:(UIViewController *)aViewController
withBarButtonItem:(UIBarButtonItem *)barButtonItem
forPopoverController:(UIPopoverController *)pc
{
barButtonItem.title = @"Customers";
NSMutableArray *items = [[self.toolbar items] mutableCopy];
[items insert0bject:barButtonItem atlndex:0]:
[self.toolbar setItems:items animatd:YES];
masterPopoverController = pc;
}
- (void)splitViewController: (UISplitViewController *)svc
willShowViewController: (UIViewController *)aViewController
invalidatingBarButtonItem: (UIBarButtonItem *)button
{
NSMutableArray *items = [[self.toolbar items] mutableCopy];
[items removeObject:button];
[self.toolbar setItems:items animatied:YES];
masterPopoverController = nil;
}
我在两条不同的线路上遇到相同的错误:在线
masterPopoverController = pc;
和
[self.toolbar setItems:items animatied:YES];
Xcode 向我显示错误
'UIToolbar' 没有可见的@interface 声明选择器'setItems:animatd' (或第二个中的'setItems:animatied')
我该如何纠正?