Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

pashik

macrumors member
Original poster
Jul 16, 2008
43
0
Hi.
i have UIViewController detailsController which is loaded in navigation controller.
I'd like to add view with UITabBarController into detailsController:
Code:
MyTabBarController* tabBarController = [[MyTabBarController alloc] init];
MyApplicationAppDelegate *appDelegate = (MyApplicationAppDelegate *)[[UIApplication sharedApplication] delegate];
[appDelegate.window addSubView:[tabBarController view]];

In class MyTabBarController.h:
Code:
@interface MyTabBarController:UIViewController <UITabBarControllerDelegate>{
IBOutlet UIView* view1;
IBOutlet UIView* view2;
IBOutlet UITabBarController* myTabBarController;
}

In class MyTabBarController.m:
Code:
-(void)viewDidLoad{
self.view = view1;
[super viewDidLoad];
}


But problem is that nothing is shown. Can someone tell me what i'm doing wrong?

thanx
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.