我想知道如何从 tabBarItem 显示 popOver ?这是我管理 tabBarController 的方式:
tabBarController = [[UITabBarController alloc] init];
searchSplitViewController = [[UISplitViewController alloc] init];
searchRoot = [[[EI_iPad_Home_Root_ViewController alloc] init] autorelease];
searchDetail = [[[EI_iPad_Home_Detail_ViewController alloc] init] autorelease];
searchRootNav = [[[EI_Navigation_ViewController alloc] initWithRootViewController:searchRoot]autorelease];
searchDetailNav = [[[EI_Navigation_ViewController alloc] initWithRootViewController:searchDetail] autorelease];
searchSplitViewController.viewControllers = [NSArray arrayWithObjects:searchRootNav, searchDetailNav, nil];
searchSplitViewController.delegate = searchDetail;
favoritesSplitViewController = [[UISplitViewController alloc] init];
favoritesRoot = [[[EI_iPad_Favorites_Root_ViewController alloc] init] autorelease];
favoritesDetail = [[[EI_iPad_Favorites_GeneralDetail_ViewController alloc] init] autorelease];
favoritesRootNav = [[[EI_Navigation_ViewController alloc] initWithRootViewController:favoritesRoot]autorelease];
favoritesDetailNav = [[[EI_Navigation_ViewController alloc] initWithRootViewController:favoritesDetail] autorelease];
favoritesSplitViewController.viewControllers = [NSArray arrayWithObjects:favoritesRootNav, favoritesDetailNav, nil];
favoritesSplitViewController.delegate = favoritesDetail;
agencySplitViewController = [[UISplitViewController alloc] init];
agencyRoot = [[[EI_iPad_Agency_Root_ViewController alloc] init] autorelease];
agencyDetail = [[[EI_iPad_Agency_GeneralDetail_ViewController alloc] init] autorelease];
agencyRootNav = [[[EI_Navigation_ViewController alloc] initWithRootViewController:agencyRoot]autorelease];
agencyDetailNav = [[[EI_Navigation_ViewController alloc] initWithRootViewController:agencyDetail] autorelease];
agencySplitViewController.viewControllers = [NSArray arrayWithObjects:agencyRootNav, agencyDetailNav, nil];
agencySplitViewController.delegate = agencyDetail;
editoSplitViewController = [[UISplitViewController alloc] init];
editoRoot = [[[EI_iPad_News_Root_ViewController alloc] init] autorelease];
editoDetail = [[[EI_iPad_News_Detail_ViewController alloc] init] autorelease];
editoRootNav = [[[EI_Navigation_ViewController alloc] initWithRootViewController:editoRoot]autorelease];
editoDetailNav = [[[EI_Navigation_ViewController alloc] initWithRootViewController:editoDetail] autorelease];
editoSplitViewController.viewControllers = [NSArray arrayWithObjects:editoRootNav, editoDetailNav, nil];
editoSplitViewController.delegate = editoDetail;
searchSplitViewController.tabBarItem.title = NSLocalizedString(@"TabBar_search_label",nil);
searchSplitViewController.tabBarItem.image = [UIImage imageNamed:@"tabBar_search_icon.png"];
favoritesSplitViewController.tabBarItem.title = NSLocalizedString(@"TabBar_favorite_label",nil);
favoritesSplitViewController.tabBarItem.image = [UIImage imageNamed:@"tabBar_favorite_icon.png"];
agencySplitViewController.tabBarItem.title = NSLocalizedString(@"TabBar_agencies_label",nil);
agencySplitViewController.tabBarItem.image = [UIImage imageNamed:@"tabBar_agencies_icon.png"];
editoSplitViewController.tabBarItem.title = NSLocalizedString(@"TabBar_news_label",nil);
editoSplitViewController.tabBarItem.image = [UIImage imageNamed:@"tabBar_news_icon.png"];
tabBarController.viewControllers = [NSArray arrayWithObjects:searchSplitViewController,favoritesSplitViewController,agencySplitViewController,editoSplitViewController,nil];
[window addSubview:[tabBarController view]];
我想添加第五个项目,它将显示一个弹出窗口......有什么想法吗?谢谢