2010-07-03 72 views

回答

2

您可以随时访问应用程序的委托如下:

[UIApplication sharedApplication].delegate 

所以,你应该能够通过这样的tabBarController获得:

MyAppDelegate *delegate = (MyAppDelegate *)[UIApplication sharedApplication].delegate; 

现在参考delegate.tabBarController。

[在上面,MyAppDelegate是你给你的应用程序委托类的任何名称。]