0
我有以下設置。我有一個帶有三個NavigationControllers的TabBarController。我想要做的是以下幾點:Tabbar控制器通過應用程序代理訪問當前選項卡的活動導航控制器
我有一個帶有註釋的mapview和一個註釋按鈕,我實現了當註釋按鈕被點擊時觸發的委託方法。我的問題是,我的MapView的委託也是MapView的
[self.mapView addSubview:self];
[self.mapView setRegion:region];
[self.mapView setDelegate:self];
這是我用來吸取我的MapView的路線的自定義類的子視圖。
換言之下面的方法是在自定義類,這是我的MapView類的
- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
{
Helper *myHelper = [Helper sharedManager];
StationInfo *myViewController = [[StationInfo alloc] initWithNibName:@"StationInfo" bundle:[NSBundle mainBundle]];
myViewController.station = [myHelper.stations objectAtIndex:[myHelper.stations indexOfObject:[view annotation]]];
GautrainiPhoneAppDelegate *del = (GautrainiPhoneAppDelegate *)[UIApplication sharedApplication].delegate;
//missing code to push the controller onto the navigation controller that is on the active tab in the tabBarcontroller
}
那麼,如何可以推視圖控制器到有源標籤的導航堆棧使用應用程序委託的委託,它包含我的tabbarcontroller