Hi i am working on an application which has a login form and another view called as Invitation. Now heres my problem in my Login view on the hit of Login button i am coming to the Invitation View with the help of the code which looks like this
-(void)buttonPress { Invitation *obj = [[Invitation alloc]init]; [self.navigationController pushViewController:obj animated:YES]; }
Now in the Invitation view what happens is that i want a tabbar to be displayed so i wrote a code which looks like this
objTabbar = [[UITabBar alloc]init];
HomeItem = [[UITabBarItem alloc]initWithTitle:@"Home" image:[UIImage imageNamed:@"house.png"] tag:0];
BluetoothItem = [[UITabBarItem alloc]initWithTitle:@"Bluetooth" image:[UIImage imageNamed:@"bluetooth.png"] tag:1];
NSArray *a = [[NSArray alloc]initWithObjects:HomeItem,BluetoothItem,nil];
objTabbar.items = a;
and in the LoadView method i did this
- (void)loadView {
[super loadView];
self.navigationItem.hidesBackButton = YES;
[self.view addSubview:objTabbar];
}
Now the code is building successfully but the problem is that the Tabbar is not getting displayed. I tried tabbarController and did this
tabbarController.view = objTabbar;
and added the tabbarController in the loadView method
[self.view addSubview:tabbarController.view];
But still no success
Please help me out and let me know where am i going wrong Thank You