2009-03-24 5 views

답변

4

솔루션 실측치 :

HelloWorldAppDelegate *theDelegate = (HelloWorldAppDelegate*)[[UIApplication sharedApplication] delegate]; 
tabController = theDelegate.tabBarController; 
tabController.selectedIndex = 1; 
0

U 포인터

L1AppAppDelegate theDelegate * = (L1AppAppDelegate *) [UIApplication sharedApplication] 위임]를 놓친; tabBarController = theDelegate.tabBarController; tabBarController.selectedIndex = 1;

0

시험해보세요.

self.tabBarController.selectedViewController = YOURTABBARITEMController; 
self.tabBarController.selectedViewController 
    = [self.tabBarController.viewControllers objectAtIndex:1]; 

는, 인터페이스 (.H)에 YOURTABBARController 선언을 합성하고하는 .m 파일에 인터페이스 파일을 # import를하는 것을 잊지 마십시오.

나를위한 플러스 MYTABBARController은 인터페이스에서도 @class으로 선언되었습니다.

당신은 당신을 위해 일할 수 있습니다 .... 그리고 왕처럼 보이게 !!!

관련 문제